pylhc/submitter

View on GitHub
pylhc_submitter/sixdesk_tools/submit.py

Summary

Maintainability
A
25 mins
Test Coverage
F
25%

Function check_sixtrack_output has 6 arguments (exceeds 4 allowed). Consider refactoring.
Invalid

def check_sixtrack_output(jobname: str, basedir: Path, python: Union[Path, str],
Severity: Minor
Found in pylhc_submitter/sixdesk_tools/submit.py - About 45 mins to fix

    Function sixdb_cmd has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Invalid

    def sixdb_cmd(jobname: str, basedir: Path, python: Union[Path, str], cmd: list,
    Severity: Minor
    Found in pylhc_submitter/sixdesk_tools/submit.py - About 45 mins to fix

      Function submit_sixtrack has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Invalid

      def submit_sixtrack(jobname: str, basedir: Path, python: Path = None,
      Severity: Minor
      Found in pylhc_submitter/sixdesk_tools/submit.py - About 45 mins to fix

        Function sixdb_load has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Wontfix

        def sixdb_load(jobname: str, basedir: Path, python: Union[Path, str],
        Severity: Minor
        Found in pylhc_submitter/sixdesk_tools/submit.py - About 35 mins to fix

          Function check_sixtrack_input has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Wontfix

          def check_sixtrack_input(jobname: str, basedir: Path, sixdesk: Path = SIXDESK_UTILS, ssh: str = None, resubmit: bool = False):
          Severity: Minor
          Found in pylhc_submitter/sixdesk_tools/submit.py - About 35 mins to fix

            Function submit_sixtrack has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            def submit_sixtrack(jobname: str, basedir: Path, python: Path = None,
                                sixdesk: Path = SIXDESK_UTILS, ssh: str = None, resubmit: bool = False):
                """ Generate simulation files and check if runnable and submit. """
                re_str = "Re-" if resubmit else ""
                LOG.info(f"{re_str}Submitting to sixtrack.")
            Severity: Minor
            Found in pylhc_submitter/sixdesk_tools/submit.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            There are no issues that match your filters.

            Category
            Status