sonntagsgesicht/auxilium

View on GitHub

Showing 42 of 105 total issues

Function replace_headers has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

def replace_headers(pkg=basename(getcwd()), last=None, path=getcwd()):
    last = dict() if last is None else last
    pkg = __import__(pkg) if isinstance(pkg, str) else pkg
    root, _ = split(pkg.__file__)

Severity: Minor
Found in auxilium/tools/docmaintain_tools.py - About 6 hrs 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

Function create_project has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

def create_project(name=None, slogan=None, author=None, email=None, url=None,
                   pkg_zip_file=PKG_ZIP_FILE, path=getcwd()):
    """create a new project"""

    log(INFO, '')
Severity: Minor
Found in auxilium/tools/setup_tools.py - About 3 hrs 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

Function do has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def do(name=None, slogan=None, author=None, email=None, url=None,
       commit=None, path=getcwd(), venv=None, update=None, clone=None,
       env=None, cleanup=None, **kwargs):
    env = env if env and exists(env) else None
    project_path = join(path, name) if name else path
Severity: Minor
Found in auxilium/methods/create.py - About 2 hrs 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

Function _get_help_string has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    def _get_help_string(self, action):
        action_help = action.help
        defaulting_nargs = [OPTIONAL, ZERO_OR_MORE]
        if action.default is not None and action.default is not SUPPRESS:
            if '%(default)' not in action.help:
Severity: Minor
Found in auxilium/add_arguments/formatter.py - About 2 hrs 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

Function do has 16 arguments (exceeds 4 allowed). Consider refactoring.
Open

def do(pkg=basename(getcwd()), commit=None, tag=None, header=None,
Severity: Major
Found in auxilium/methods/build.py - About 2 hrs to fix

    Function do has 15 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def do(pkg=basename(getcwd()), header=None, status=None, commit=None,
    Severity: Major
    Found in auxilium/methods/update.py - About 1 hr to fix

      Function do has 13 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def do(name=None, slogan=None, author=None, email=None, url=None,
      Severity: Major
      Found in auxilium/methods/create.py - About 1 hr to fix

        Function _run has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        def _run(command, level=LEVEL, path=getcwd(), capture_output=False):  # nosec
            proc = run(command, cwd=path, shell=True,
                       capture_output=capture_output, text=True)
            log_level = ERROR if proc.returncode else level
            if proc.stdout:
        Severity: Minor
        Found in auxilium/tools/system_tools.py - About 1 hr 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

        Function do has 12 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def do(pkg=basename(getcwd()), commit=None, fail_fast=None, pdf=None,
        Severity: Major
        Found in auxilium/methods/doc.py - About 1 hr to fix

          Function do has 11 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def do(pkg=basename(getcwd()), testpath=None, commit=None, fail_fast=None,
          Severity: Major
          Found in auxilium/methods/test.py - About 1 hr to fix

            Function auxilium has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            def auxilium(args=None):
                # init config and argument parser
                config = ConfigParser(allow_no_value=True)
                config.read(Path.home().joinpath(CONFIG_PATH))
                config.read(join(getcwd(), CONFIG_PATH))
            Severity: Minor
            Found in auxilium/__init__.py - About 1 hr 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

            Function do has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            def do(pkg=basename(getcwd()), commit=None, fail_fast=None, pdf=None,
                   api=None, doctest=None, show=None, cleanup=None, coverage=None,
                   path=None, env=None, **kwargs):
                if cleanup:
                    return _cleanup(venv=env)
            Severity: Minor
            Found in auxilium/methods/doc.py - About 1 hr 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

            Function do has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def do(command=None, demo=None, verbosity=None, exit_status=None, env=None,
            Severity: Major
            Found in auxilium/methods/root.py - About 1 hr to fix

              Function create_project has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              def create_project(name=None, slogan=None, author=None, email=None, url=None,
                                 pkg_zip_file=PKG_ZIP_FILE, path=getcwd()):
                  """create a new project"""
              
                  log(INFO, '')
              Severity: Minor
              Found in auxilium/tools/setup_tools.py - About 1 hr to fix

                Function do has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                def do(pkg=basename(getcwd()), testpath=None, commit=None, fail_fast=None,
                       quality=None, security=None, coverage=None, cleanup=None,
                       path=None, env=None, **kwargs):
                    """run test process"""
                
                
                Severity: Minor
                Found in auxilium/methods/test.py - About 1 hr 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

                Function do has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                def do(pkg=basename(getcwd()), header=None, status=None, commit=None,
                       pull=None, remote=None, remote_usr=None, remote_pwd=None,
                       install=None, upgrade=None, requirements=None, cleanup=None,
                       path=getcwd(), env=None, **kwargs):
                    if cleanup:
                Severity: Minor
                Found in auxilium/methods/update.py - About 1 hr 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

                Function start_demo has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def start_demo(demo=DEMO_PATH, verbosity=0, exit_status=0, env=None, **kwargs):
                    logging.log(logging.INFO, ICONS["demo"] + 'relax, just starting a demo')
                    if exists(demo):
                        yn = input(" " + ICONS["warn"] +
                                   "demo path exists. "
                Severity: Minor
                Found in auxilium/methods/root.py - About 55 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

                Function do has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def do(command=None, demo=None, verbosity=None, exit_status=None, env=None,
                       pre=None, pkg=None, path=None, **kwargs):
                    exit = int if exit_status < 0 else sys.exit
                    # check demo
                    if demo:
                Severity: Minor
                Found in auxilium/methods/root.py - About 55 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

                Function create_project has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def create_project(name=None, slogan=None, author=None, email=None, url=None,
                Severity: Major
                Found in auxilium/tools/setup_tools.py - About 50 mins to fix

                  Function do has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def do(c='', m='', f='', stdin='', arg=(), env=None, **kwargs):
                  Severity: Major
                  Found in auxilium/methods/python.py - About 50 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language