Showing 228 of 691 total issues
Avoid deeply nested control flow statements. Open
if "coda" in attrs["sound"]:
measure.coda = attrs["sound"]["coda"]
if "dacapo" in attrs["sound"]:
Avoid deeply nested control flow statements. Open
if "dacapo" in attrs["sound"]:
measure.dacapo = YesNoToBool(attrs["sound"]["dacapo"])
if "dalsegno" in attrs["sound"]:
Avoid deeply nested control flow statements. Open
if "root-alter" in content:
root.alter = content["root-alter"]
Avoid deeply nested control flow statements. Open
if "tocoda" in attrs["sound"]:
measure.tocoda = attrs["sound"]["tocoda"]
Avoid deeply nested control flow statements. Open
if result is None:
item.close_timemod = True
if previous is not None:
Avoid deeply nested control flow statements. Open
if previous is not None:
if hasattr(previous.GetItem(), "timeMod"):
item.timeMod.first = False
else:
item.timeMod.first = True
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, **kwargs):
text = None
size = None
font = None
type = None
- 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
Avoid deeply nested control flow statements. Open
if not isinstance(
values[key][k],
str) and not isinstance(
values[key][k],
int) and not isinstance(
Avoid deeply nested control flow statements. Open
if result is not None:
if next_result is None:
note.CheckForGraceNotes()
else:
result.last = False
Function toLily
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def toLily(self):
lilystring = ""
style_line = ""
if hasattr(self, "lineType"):
if self.lineType == "solid":
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
def toLily(self):
val = ""
gliss = "\glissando"
values = []
if hasattr(self, "lineType"):
- 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
Avoid deeply nested control flow statements. Open
if not isinstance(
item,
str) and not isinstance(
item,
int) and not isinstance(
Avoid deeply nested control flow statements. Open
if counter == index:
return node.GetChild(child)
if isinstance(result, cls_type):
Avoid deeply nested control flow statements. Open
if len(barres) > 0:
val += "-".join(barres)
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, **kwargs):
if "strings" in kwargs:
if kwargs["strings"] is not None:
self.strings = kwargs["strings"]
else:
- 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
Avoid deeply nested control flow statements. Open
if hasattr(item, "timeMod"):
res = item.Search(Tuplet)
if not hasattr(
next_item,
Avoid deeply nested control flow statements. Open
if hasattr(self, "trem_length"):
value *= self.trem_length
value = int(value)
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, **kwargs):
text = None
size = None
font = None
placement = None
- 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
Avoid deeply nested control flow statements. Open
if hasattr(self, "trem_length"):
rounded *= self.trem_length
value = int(rounded)
Consider simplifying this complex logical expression. Open
if tag[-
2] == "technical" and tag[-
1] != "bend" and tag[-
1] != "hammer-on" and tag[-
1] != "pull-off":