Godley/MuseParse

View on GitHub
MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py

Summary

Maintainability
F
1 wk
Test Coverage

File Directions.py has 649 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import string
import random

from MuseParse.classes.ObjectHierarchy.ItemClasses import BaseClass

Severity: Major
Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py - About 1 day to fix

    Cyclomatic complexity is too high in method __init__. (16)
    Open

        def __init__(self, **kwargs):
            font = None
            size = None
            text = None
            if "font" in kwargs:

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method toLily. (15)
    Open

        def toLily(self):
            return_val = " \\tempo "
            converter = {
                "eighth": 8,
                "quarter": 4,

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (14)
    Open

        def __init__(self, **kwargs):
            text = None
            size = None
            font = None
            type = None

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

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

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

    Cyclomatic complexity is too high in method toLily. (11)
    Open

        def toLily(self):
            '''
            Method which converts the object instance and its attributes to a string of lilypond code
    
            :return: str of lilypond code

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class Bracket. (11)
    Open

    class Bracket(Line):
    
        def __init__(self, **kwargs):
            text = None
            size = None

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (11)
    Open

        def __init__(self, **kwargs):
            size = None
            font = None
            text = None
            if "secondBeat" in kwargs:

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class CreditText. (11)
    Open

    class CreditText(Text):
    
        """
        Class which represents credits - anything which is to go at the bottom of the page, like copyrights,
        authors etc. Essentially the same as text except it can be positioned

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

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

        def toLily(self):
            '''
            Method which converts the object instance and its attributes to a string of lilypond code
    
            :return: str of lilypond code
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py - About 2 hrs 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

    Cyclomatic complexity is too high in method toLily. (10)
    Open

        def toLily(self):
            return_val = ""
            if (hasattr(self, "type") and self.type != "stop") or not hasattr(
                    self, "type"):
                if hasattr(self, "line"):

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class Metronome. (10)
    Open

    class Metronome(Direction):
    
        """
        Class representing a metronome mark, which can be a combination of <note> = <number per minute> and text
    
    

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class Pedal. (9)
    Open

    class Pedal(Line):
    
        """
        A piano pedal marker class.
    
    

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (9)
    Open

        def __init__(self, **kwargs):
            placement = None
            text = None
            font = None
            size = None

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class OctaveShift. (9)
    Open

    class OctaveShift(Line):
    
        """
        Class representing specifically octave shifts
    
    

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

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

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

    Cyclomatic complexity is too high in method __init__. (8)
    Open

        def __init__(self, **kwargs):
            text = None
            size = None
            font = None
            placement = None

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method toLily. (8)
    Open

        def toLily(self):
            return_val = "\n\ottava #"
            multiplier = 1
            octave = 0
            if hasattr(self, "type"):

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (8)
    Open

        def __init__(self, **kwargs):
            text = None
            size = None
            font = None
            placement = None

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (8)
    Open

        def __init__(self, **kwargs):
            text = None
            size = None
            font = None
            type = None

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class Line. (7)
    Open

    class Line(Direction):
    
        """
        Class representing lines over the bar, such as brackets or braces. Essentially I think this is a stub to be sub classed
        so don't instantiate line on its own without some modification.

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (7)
    Open

        def __init__(self, **kwargs):
            BaseClass.Base.__init__(self)
            if "font" in kwargs and kwargs["font"] is not None:
                self.font = kwargs["font"]
            if "size" in kwargs and kwargs["size"] is not None:

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method toLily. (7)
    Open

        def toLily(self):
            lilystring = ""
            style_line = ""
            if hasattr(self, "lineType"):
                if self.lineType == "solid":

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class Text. (7)
    Open

    class Text(BaseClass.Base):
    
        """
        A class representing any kind of text
    
    

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (7)
    Open

        def __init__(self, **kwargs):
            text = None
            size = None
            font = None
            placement = None

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    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"):
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.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

    Cyclomatic complexity is too high in method __init__. (6)
    Open

        def __init__(self, **kwargs):
            text = None
            size = None
            font = None
            if "placement" in kwargs:

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (6)
    Open

        def __init__(self, **kwargs):
            placement = None
            size = None
            font = None
            if "size" in kwargs:

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class Forward. (6)
    Open

    class Forward(Direction):
    
        """
        Probably an unused class - forwards arent what I thought they were.
        """

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method toLily. (6)
    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) {",

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method __init__. (6)
    Open

        def __init__(self, **kwargs):
            placement = None
            size = None
            font = None
            text = None

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method toLily. (6)
    Open

        def toLily(self):
            textLilyString = Text.toLily(self)
            symbol = ""
            return_val = " "
            if hasattr(self, "placement"):

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in class Direction. (6)
    Open

    class Direction(Text):
    
        """
        Class representing directions - see sub classes for what these generally are. This class is used for
        regular text directions such as "andante" or "cantabile"

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    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,
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.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

    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:
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.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

    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"):
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.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

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

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

    Function __init__ has a Cognitive Complexity of 9 (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 55 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 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def toLily(self):
            textLilyString = Text.toLily(self)
            symbol = ""
            return_val = " "
            if hasattr(self, "placement"):
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py - About 55 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 8 (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 45 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 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, **kwargs):
            text = None
            size = None
            font = None
            type = None
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py - About 45 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 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def toLily(self):
            lilystring = ""
            style_line = ""
            if hasattr(self, "lineType"):
                if self.lineType == "solid":
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py - About 45 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

    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):
            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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, **kwargs):
            placement = None
            size = None
            font = None
            if "size" in kwargs:
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
    Open

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

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if hasattr(self, "type"):
                if self.type == "crescendo":
                    return_val += "<"
                if self.type == "diminuendo":
                    return_val += ">"
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 1 other location - About 3 hrs to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 209..215

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if hasattr(self, "justify"):
                options = {
                    "right": "\\fill-line {\n\\null \n\override #'(baseline-skip . 4)\n\override #'(line-width . 40) {",
                    "center": "\\fill-line { \n \\center-column {\n"}
                if self.justify in options:
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 1 other location - About 1 hr to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 159..162

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if hasattr(self, "justify"):
                options = {"right": "\n}\n\t}\n\\null\\null", "center": "\n}\n}"}
                if self.justify in options:
                    lily += options[self.justify]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 1 other location - About 1 hr to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 149..154

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if hasattr(self, "lineType"):
                if self.lineType == "solid":
                    lilystring = "\\override TextSpanner.dash-fraction = 1.0 \n"
                elif self.lineType == "dashed":
                    lilystring = "\\override TextSpanner.dash-fraction = 0.5 \n"
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 1 other location - About 1 hr to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 556..560

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 44.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if hasattr(self, "type"):
                if self.type == "stop":
                    lilystring = "\n\\stopTextSpan\n"
                elif self.type == "start":
                    lilystring = "\n\\startTextSpan\n"
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 1 other location - About 1 hr to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 551..555

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 44.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            if "font" in kwargs and kwargs["font"] is not None:
                self.font = kwargs["font"]
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 26..27
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 199..200
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 201..202
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 203..204
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meter.py on lines 20..21

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 40.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            if "size" in kwargs and kwargs["size"] is not None:
                self.size = kwargs["size"]
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 24..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 199..200
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 201..202
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 203..204
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meter.py on lines 20..21

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 40.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "valign" in kwargs:
                if kwargs["valign"] is not None:
                    self.valign = kwargs["valign"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "size" in kwargs:
                if kwargs["size"] is not None:
                    self.size = kwargs["size"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "justify" in kwargs:
                if kwargs["justify"] is not None:
                    self.justify = kwargs["justify"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "placement" in kwargs:
                if kwargs["placement"] is not None:
                    self.placement = kwargs["placement"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "y" in kwargs:
                if kwargs["y"] is not None:
                    self.y = kwargs["y"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "number" in kwargs:
                if kwargs["number"] is not None:
                    self.number = kwargs["number"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "lineEnd" in kwargs:
                if kwargs["lineEnd"] is not None:
                    self.lineEnd = kwargs["lineEnd"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "page" in kwargs:
                if kwargs["page"] is not None:
                    self.page = kwargs["page"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "placement" in kwargs:
                if kwargs["placement"] is not None:
                    self.sym_placement = kwargs["placement"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "elength" in kwargs:
                if kwargs["elength"] is not None:
                    self.endLength = kwargs["elength"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "type" in kwargs:
                if kwargs["type"] is not None:
                    self.type = kwargs["type"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "ltype" in kwargs:
                if kwargs["ltype"] is not None:
                    self.lineType = kwargs["ltype"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "line" in kwargs:
                if kwargs["line"] is not None:
                    self.line = kwargs["line"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "x" in kwargs:
                if kwargs["x"] is not None:
                    self.x = kwargs["x"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "amount" in kwargs:
                if kwargs["amount"] is not None:
                    self.amount = kwargs["amount"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 785..787
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 29 locations. Consider refactoring.
    Open

            if "type" in kwargs:
                if kwargs["type"] is not None:
                    self.type = kwargs["type"]
    Severity: Major
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 28 other locations - About 55 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 127..129
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 130..132
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 133..135
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 136..138
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 139..141
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 142..144
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 209..211
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 316..318
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 358..360
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 389..391
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 468..470
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 518..520
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 521..523
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 524..526
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 527..529
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 23..25
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 26..28
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 29..31
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 89..91
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 166..168
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 169..171
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 172..174
    MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py on lines 175..177
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 21..23
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 24..26
    MuseParse/classes/ObjectHierarchy/ItemClasses/Meta.py on lines 27..29
    MuseParse/classes/ObjectHierarchy/ItemClasses/Ornaments.py on lines 71..73
    MuseParse/classes/ObjectHierarchy/TreeClasses/MeasureNode.py on lines 41..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 39.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if "type" in kwargs:
                if kwargs["type"] is not None:
                    type = kwargs["type"]
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 1 other location - About 45 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 274..276

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 37.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if "placement" in kwargs:
                if kwargs["placement"] is not None:
                    placement = kwargs["placement"]
    Severity: Minor
    Found in MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py and 1 other location - About 45 mins to fix
    MuseParse/classes/ObjectHierarchy/ItemClasses/Directions.py on lines 401..403

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 37.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Line too long (97 > 79 characters)
    Open

            Method which converts the object instance and its attributes to a string of lilypond code

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (108 > 79 characters)
    Open

        Class representing a metronome mark, which can be a combination of <note> = <number per minute> and text

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Invalid escape sequence '\o'
    Open

                    "right": "\\fill-line {\n\\null \n\override #'(baseline-skip . 4)\n\override #'(line-width . 40) {",

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Line too long (116 > 79 characters)
    Open

        Text class representing lyrics. Unused because needs readjustment in order to fit lyrics into Lilypond's output.

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (86 > 79 characters)
    Open

        Class representing a wavy line, such as the one used for an extended trill marking

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Invalid escape sequence '\m'
    Open

                return_val += "\markup {\n\t\concat {\n\t\t"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Do not use bare 'except'
    Open

                except:

    When catching exceptions, mention specific exceptions when possible.

    Okay: except Exception:
    Okay: except BaseException:
    E722: except:

    Invalid escape sequence '\s'
    Open

                text = "\start"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Line too long (109 > 79 characters)
    Open

            - font: the font to use. If this isn't in the list of fonts in lilypond, a random one will be picked.

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (123 > 79 characters)
    Open

        Class representing lines over the bar, such as brackets or braces. Essentially I think this is a stub to be sub classed

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (109 > 79 characters)
    Open

            - secondBeat: in place of min, could also have this representing another beat. Like crotchet = quaver

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (104 > 79 characters)
    Open

        Class which represents credits - anything which is to go at the bottom of the page, like copyrights,

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (116 > 79 characters)
    Open

                    "right": "\\fill-line {\n\\null \n\override #'(baseline-skip . 4)\n\override #'(line-width . 40) {",

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (104 > 79 characters)
    Open

        Class representing directions - see sub classes for what these generally are. This class is used for

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (82 > 79 characters)
    Open

            - syllabic: whether this lyric is meant to fit syllables to each diff note

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Invalid escape sequence '\s'
    Open

            return_val += "\sustain"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\g'
    Open

                lily += "\general-align #Y #" + option[self.valign] + "\n "

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\m'
    Open

            return " \mark " + Direction.toLily(self)

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Line too long (125 > 79 characters)
    Open

        Same as direction, except that text - generally "A" or "C" is used to figure out which number mark lilypond is expecting.

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Invalid escape sequence '\s'
    Open

                return_val += "\n\t\t\t\smaller \general-align #Y #DOWN \\note #\""

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\d'
    Open

                    text += "\default"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\s'
    Open

                        return_val += "\n\set Staff.pedalSustainStyle = #'text\n"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\o'
    Open

                    "right": "\\fill-line {\n\\null \n\override #'(baseline-skip . 4)\n\override #'(line-width . 40) {",

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\m'
    Open

            text = " \mark "

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\m'
    Open

                    text = "\musicglyph #\"scripts." + self.type + "\""

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\o'
    Open

                    return_val = "\n\ottava #0"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Line too long (105 > 79 characters)
    Open

            - amount: the amount to shift up/down octaves. Int, generally 8 or 15 depending on whether 1 or 2

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Invalid escape sequence '\o'
    Open

            return_val = "\n\ottava #"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Do not use bare 'except'
    Open

                except:

    When catching exceptions, mention specific exceptions when possible.

    Okay: except Exception:
    Okay: except BaseException:
    E722: except:

    Invalid escape sequence '\s'
    Open

                    return_val += "Off\sustainOn\n"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\d'
    Open

                text += "\default"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\c'
    Open

                return_val += "\markup {\n\t\concat {\n\t\t"

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Line too long (124 > 79 characters)
    Open

            - parentheses: this could also be optionally set later to indicate whether or not to put parentheses round the mark.

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (111 > 79 characters)
    Open

                        self.beat]) + "\" #1\n\t\t\t\t\" = \"\n\t\t\t\t\smaller \general-align #Y #DOWN \\note #\""

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Invalid escape sequence '\g'
    Open

                return_val += "\n\t\t\t\smaller \general-align #Y #DOWN \\note #\""

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Invalid escape sequence '\s'
    Open

                        self.beat]) + "\" #1\n\t\t\t\t\" = \"\n\t\t\t\t\smaller \general-align #Y #DOWN \\note #\""

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    Line too long (112 > 79 characters)
    Open

            - type: crescendo/diminuendo/stop. In Lilypond stop is an option because every wedge must end somewhere,

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Invalid escape sequence '\g'
    Open

                        self.beat]) + "\" #1\n\t\t\t\t\" = \"\n\t\t\t\t\smaller \general-align #Y #DOWN \\note #\""

    Invalid escape sequences are deprecated in Python 3.6.

    Okay: regex = r'\.png$'
    W605: regex = '\.png$'

    There are no issues that match your filters.

    Category
    Status