chrismaille/buzio

View on GitHub

Showing 28 of 47 total issues

Avoid deeply nested control flow statements.
Open

                        if not callable(validator):
                            raise ValueError(
                                "Validator must be a function")
                        text = self.text
Severity: Major
Found in buzio/cli.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if not answered:
                                ask_text = "Please answer again: "
                            self.text = text
    Severity: Major
    Found in buzio/cli.py - About 45 mins to fix

      Function confirm has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def confirm(
      Severity: Minor
      Found in buzio/cli.py - About 45 mins to fix

        Function select has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def select(self,
        Severity: Minor
        Found in buzio/cli.py - About 45 mins to fix

          Function box has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def box(self, obj, theme="box", transform=None, humanize=True, **kwargs):
          Severity: Minor
          Found in buzio/cli.py - About 35 mins to fix

            Function unitext has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def unitext(self, obj, theme=None, transform=None,
            Severity: Minor
            Found in buzio/cli.py - About 35 mins to fix

              Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(self, format_only=False, default_prefix="",
              Severity: Minor
              Found in buzio/cli.py - About 35 mins to fix

                Function section has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

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

                Severity
                Category
                Status
                Source
                Language