psyinfra/onyo

View on GitHub

Rework `--message` parameter
#701

bpoldrack wants to merge bpoldrack:fix-685 into psyinfra:main
Failed
6 issues to fix.

Function onyo_mv has 5 arguments (exceeds 4 allowed). Consider refactoring.
New

def onyo_mv(inventory: Inventory,
Severity: Minor
Found in onyo/lib/commands.py - About 35 mins to fix

    Function onyo_rm has 5 arguments (exceeds 4 allowed). Consider refactoring.
    New

    def onyo_rm(inventory: Inventory,
    Severity: Minor
    Found in onyo/lib/commands.py - About 35 mins to fix

      Function onyo_set has 5 arguments (exceeds 4 allowed). Consider refactoring.
      New

      def onyo_set(inventory: Inventory,
      Severity: Minor
      Found in onyo/lib/commands.py - About 35 mins to fix

        Function onyo_unset has 5 arguments (exceeds 4 allowed). Consider refactoring.
        New

        def onyo_unset(inventory: Inventory,
        Severity: Minor
        Found in onyo/lib/commands.py - About 35 mins to fix

          Function generate_auto_message has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          New

              def generate_auto_message(format_string: str,
                                        max_length: int = 80,
                                        **kwargs) -> str:
                  r"""Generate a commit message subject.
          
          
          Severity: Minor
          Found in onyo/lib/onyo.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

          OnyoRepo has 21 functions (exceeds 20 allowed). Consider refactoring.
          New

          class OnyoRepo(object):
              r"""
              An object representing an Onyo repository.
          
              Allows identifying and working with asset paths and directories, getting and
          Severity: Minor
          Found in onyo/lib/onyo.py - About 2 hrs to fix

            Function generate_commit_message has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Fixed

            Severity: Minor
            Found in onyo/lib/onyo.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

            There are no issues that match your filters.

            Category
            Status

            No ratings changes.