chrismaille/buzio

View on GitHub

Showing 28 of 47 total issues

File cli.py has 771 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
"""Buzio main code.

This is the main code for Buzio Package
It contains the Console class.
Severity: Major
Found in buzio/cli.py - About 1 day to fix

    Function ask has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        def ask(
                self,
                obj,
                theme="warning",
                transform=None,
    Severity: Minor
    Found in buzio/cli.py - About 4 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

    File tests.py has 295 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    """Unittest module."""
    import unittest
    import datetime
    from buzio.cli import Console
    Severity: Minor
    Found in buzio/tests.py - About 3 hrs to fix

      Function _humanize has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

          def _humanize(self, obj, **kwargs):
              """Summary
      
              Args:
                  obj (TYPE): Description
      Severity: Minor
      Found in buzio/cli.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 run has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

          def run(
                  self,
                  task,
                  title=None,
                  get_stdout=False,
      Severity: Minor
      Found in buzio/cli.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 choose has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          def choose(
                  self,
                  choices,
                  question=None,
                  theme="choose",
      Severity: Minor
      Found in buzio/cli.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 _print has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          def _print(self, linebreak=False):
              """Summary
      
              Parameters
              ----------
      Severity: Minor
      Found in buzio/cli.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

      Console has 22 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Console():
          """Console class.
      
          Attributes:
              DEFAULT_THEMES (Dict): Default color theme
      Severity: Minor
      Found in buzio/cli.py - About 2 hrs to fix

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

            def select(self,
                       obj,
                       theme="choose",
                       humanize=True,
                       question=None,
        Severity: Minor
        Found in buzio/cli.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 confirm has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

            def confirm(
                    self,
                    obj=None,
                    theme="confirm",
                    transform=None,
        Severity: Minor
        Found in buzio/cli.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 ask has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def ask(
        Severity: Major
        Found in buzio/cli.py - About 1 hr to fix

          Function run has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def run(
          Severity: Major
          Found in buzio/cli.py - About 1 hr to fix

            Function section has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def section(
            Severity: Major
            Found in buzio/cli.py - About 1 hr to fix

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

                  def choose(
              Severity: Major
              Found in buzio/cli.py - About 50 mins to fix

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

                    def progress(self, count, total, prefix=_('Reading'), theme=None,
                Severity: Major
                Found in buzio/cli.py - About 50 mins to fix

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

                      def _run_style(self, obj, theme, transform,
                  Severity: Major
                  Found in buzio/cli.py - About 50 mins to fix

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

                        def info(
                    Severity: Major
                    Found in buzio/cli.py - About 50 mins to fix

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

                          def success(
                      Severity: Major
                      Found in buzio/cli.py - About 50 mins to fix

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

                            def error(
                        Severity: Major
                        Found in buzio/cli.py - About 50 mins to fix

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

                              def warning(
                          Severity: Major
                          Found in buzio/cli.py - About 50 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language