Showing 228 of 691 total issues
Function handlePreLilies
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def handlePreLilies(self):
'''
Fetches all notation to come before the note as a lilypond string
:return: str
'''
- Read upRead up
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 HandleSlidesAndGliss
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def HandleSlidesAndGliss(tags, attrs, content, piece, data):
type = None
number = None
lineType = None
if "slide" in tags or "glissando" in tags:
- Read upRead up
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 15 (exceeds 5 allowed). Consider refactoring. Open
def toLily(self):
return_val = ""
if (hasattr(self, "type") and self.type != "stop") or not hasattr(
self, "type"):
if hasattr(self, "line"):
- Read upRead up
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 HandleAttributes
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def HandleAttributes(self):
lilystring = ""
if hasattr(self, "newSystem"):
lilystring += "\\break "
if hasattr(self, "newPage"):
- Read upRead up
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 handleLyrics
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def handleLyrics(tags, attrs, chars, piece, data):
if "lyric" in tags:
if not hasattr(data["note"], "lyrics"):
data["note"].lyrics = {}
number = len(data["note"].lyrics)
- Read upRead up
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 NewData
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def NewData(self, text):
'''
Method which is called by the SAX parser upon encountering text inside a tag
:param text: the text encountered
:return: None, has side effects modifying the class itself
- Read upRead up
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 14 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, **kwargs):
if "style" in kwargs:
if kwargs["style"] is not None:
self.style = kwargs["style"]
'''style of the barline to display'''
- Read upRead up
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 14 (exceeds 5 allowed). Consider refactoring. Open
def toLily(self):
return_val = " \\tempo "
converter = {
"eighth": 8,
"quarter": 4,
- Read upRead up
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 HandleNoteheads
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def HandleNoteheads(tags, attrs, content, piece, data):
if "note" in tags:
if tags[-1] == "notehead":
data["note"].notehead = Note.Notehead()
if "notehead" in attrs:
- Read upRead up
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 Find
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def Find(self, node_type, item_type):
'''
method for finding specific types of notation from nodes.
will currently return the first one it encounters because this method's only really intended
for some types of notation for which the exact value doesn't really
- Read upRead up
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 SortedChildren
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def SortedChildren(self):
children = self.GetChildrenIndexes()
integers = [child for child in children if isinstance(child, int)]
strings = [child for child in children if isinstance(child, str)]
result = []
- Read upRead up
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 13 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, **kwargs):
size = None
font = None
text = None
if "secondBeat" in kwargs:
- Read upRead up
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 CalculateTransposition
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def CalculateTransposition(self):
scale = [
'a',
'bes',
'b',
- Read upRead up
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 HandleMovementBetweenDurations
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def HandleMovementBetweenDurations(tags, attrs, chars, piece, data):
global last_note
measure_id = IdAsInt(helpers.GetID(attrs, "measure", "number"))
part_id = helpers.GetID(attrs, "part", "id")
- Read upRead up
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 DoBarlineChecks
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def DoBarlineChecks(self):
measure_indexes = self.GetChildrenIndexes()
if hasattr(self, "backward_repeats"):
if len(self.backward_repeats) > 0:
measure = self.GetChild(measure_indexes[0])
- Read upRead up
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 AttachExpression
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def AttachExpression(self, new_node):
if len(self.children) > 0:
if isinstance(self.GetChild(0), OtherNodes.DirectionNode):
self.PositionChild(0, new_node)
if isinstance(self.GetChild(0), NoteNode):
- Read upRead up
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 12 (exceeds 5 allowed). Consider refactoring. Open
def toLily(self):
lilystring = ""
if hasattr(self, "number"):
if self.number == 1:
lilystring = "\\alternative {\n"
- Read upRead up
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 handlePostLilies
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def handlePostLilies(self):
val = ""
if hasattr(self, "chord") and self.chord == "stop":
val += ">"
val += self.getLilyDuration()
- Read upRead up
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 12 (exceeds 5 allowed). Consider refactoring. Open
def toLily(self):
val = Notation.toLily(self)
if hasattr(self, "symbol"):
if self.symbol != "fermata":
if self.symbol == "angled":
- Read upRead up
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 12 (exceeds 5 allowed). Consider refactoring. Open
def toLily(self):
return_val = "\n\ottava #"
multiplier = 1
octave = 0
if hasattr(self, "type"):
- Read upRead up
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"