Godley/MuseParse

View on GitHub

Showing 691 of 691 total issues

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

def SetupFormat(tags, attrs, text, piece, data):
Severity: Minor
Found in MuseParse/classes/Input/MxmlParser.py - About 35 mins to fix

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

    def SetupPiece(tag, attrib, content, piece, data):
    Severity: Minor
    Found in MuseParse/classes/Input/MxmlParser.py - About 35 mins to fix

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

      def UpdatePart(tag, attrib, content, piece, data):
      Severity: Minor
      Found in MuseParse/classes/Input/MxmlParser.py - About 35 mins to fix

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

        def HandleNoteheads(tags, attrs, content, piece, data):
        Severity: Minor
        Found in MuseParse/classes/Input/MxmlParser.py - About 35 mins to fix

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

              def addKey(self, item, measure_id):
                  staves = self.GetChildrenIndexes()
                  for staff_id in staves:
                      measure = self.getMeasure(measure_id, staff_id)
                      if measure is not None:
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/TreeClasses/PartNode.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

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

              def CheckMeasureDivisions(self, measure):
                  divisions = None
                  staves = self.GetChildrenIndexes()
                  for staff in staves:
                      measure_obj = self.getMeasure(measure, staff)
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/TreeClasses/PartNode.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

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

              def toLily(self):
                  return_val = "\\"
                  if hasattr(self, "type"):
                      if self.type == "crescendo":
                          return_val += "<"
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.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

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

              def toLily(self):
                  val = "\grace"
                  ending = ""
                  if hasattr(self, "slash") and self.slash:
                      val = "\slashedGrace"
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Note.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

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

              def toLily(self):
                  return_val = "\\repeat tremolo "
                  num = ""
                  if hasattr(self, "value"):
                      options = {1: 2, 2: 4, 3: 8}
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.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

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

              def __init__(self, **kwargs):
                  text = None
                  size = None
                  font = None
                  placement = None
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.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

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

              def toLily(self):
                  val = ""
                  if hasattr(self, "bracket"):
                      if self.bracket:
                          val += "\once \override TupletBracket.bracket-visibility = ##t\n"
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Note.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

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

              def __init__(self, **kwargs):
                  self.preNote = True
                  BaseClass.Base.__init__(self)
                  if "type" in kwargs:
                      if kwargs["type"] is not None:
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.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

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

              def toLily(self):
                  lily = ""
                  if hasattr(self, "justify"):
                      options = {
                          "right": "\\fill-line {\n\\null \n\override #'(baseline-skip . 4)\n\override #'(line-width . 40) {",
          Severity: Minor
          Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.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

          Avoid too many return statements within this function.
          Open

                              return node
          Severity: Major
          Found in MuseParse/classes/ObjectHierarchy/TreeClasses/BaseTree.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return None
            Severity: Major
            Found in MuseParse/classes/ObjectHierarchy/TreeClasses/BaseTree.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                  return counter
              Severity: Major
              Found in MuseParse/classes/ObjectHierarchy/TreeClasses/BaseTree.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                    return counter
                Severity: Major
                Found in MuseParse/classes/ObjectHierarchy/TreeClasses/BaseTree.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                      return result
                  Severity: Major
                  Found in MuseParse/classes/ObjectHierarchy/TreeClasses/BaseTree.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                        return result
                    Severity: Major
                    Found in MuseParse/classes/ObjectHierarchy/TreeClasses/BaseTree.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return result
                      Severity: Major
                      Found in MuseParse/classes/ObjectHierarchy/TreeClasses/BaseTree.py - About 30 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language