christoph2/pydbc

View on GitHub

Showing 197 of 197 total issues

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

        self.ENVVAR_BY_NAME = self.bakery(lambda session: session.query(EnvVar).filter(EnvVar.name == bindparam('name')))
Severity: Major
Found in pydbc/dbcListener.py and 15 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 82..82
pydbc/dbcListener.py on lines 84..85
pydbc/dbcListener.py on lines 88..88
pydbc/dbcListener.py on lines 89..89
pydbc/ldfListener.py on lines 111..112
pydbc/ldfListener.py on lines 113..114
pydbc/ldfListener.py on lines 115..116
pydbc/ldfListener.py on lines 117..117
pydbc/ldfListener.py on lines 118..118
pydbc/ldfListener.py on lines 119..119
pydbc/parser.py on lines 106..106
pydbc/parser.py on lines 107..107
pydbc/parser.py on lines 108..108
pydbc/parser.py on lines 109..109
pydbc/parser.py on lines 110..110

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 43.

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 16 locations. Consider refactoring.
Open

        self.NODE_BY_NAME = self.bakery(lambda session: session.query(Node).filter(Node.name == bindparam('name')))
Severity: Major
Found in pydbc/parser.py and 15 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 82..82
pydbc/dbcListener.py on lines 83..83
pydbc/dbcListener.py on lines 84..85
pydbc/dbcListener.py on lines 88..88
pydbc/dbcListener.py on lines 89..89
pydbc/ldfListener.py on lines 111..112
pydbc/ldfListener.py on lines 113..114
pydbc/ldfListener.py on lines 115..116
pydbc/ldfListener.py on lines 117..117
pydbc/ldfListener.py on lines 118..118
pydbc/ldfListener.py on lines 119..119
pydbc/parser.py on lines 106..106
pydbc/parser.py on lines 108..108
pydbc/parser.py on lines 109..109
pydbc/parser.py on lines 110..110

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 43.

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 16 locations. Consider refactoring.
Open

        self.MESSAGE_BY_NAME = self.bakery(lambda session: session.query(Message).filter(Message.name == bindparam('name')))
Severity: Major
Found in pydbc/parser.py and 15 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 82..82
pydbc/dbcListener.py on lines 83..83
pydbc/dbcListener.py on lines 84..85
pydbc/dbcListener.py on lines 88..88
pydbc/dbcListener.py on lines 89..89
pydbc/ldfListener.py on lines 111..112
pydbc/ldfListener.py on lines 113..114
pydbc/ldfListener.py on lines 115..116
pydbc/ldfListener.py on lines 117..117
pydbc/ldfListener.py on lines 118..118
pydbc/ldfListener.py on lines 119..119
pydbc/parser.py on lines 107..107
pydbc/parser.py on lines 108..108
pydbc/parser.py on lines 109..109
pydbc/parser.py on lines 110..110

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 43.

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 16 locations. Consider refactoring.
Open

        self.NODE_BY_RID = self.bakery(lambda session: session.query(Node).filter(Node.rid == bindparam('rid')))
Severity: Major
Found in pydbc/parser.py and 15 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 82..82
pydbc/dbcListener.py on lines 83..83
pydbc/dbcListener.py on lines 84..85
pydbc/dbcListener.py on lines 88..88
pydbc/dbcListener.py on lines 89..89
pydbc/ldfListener.py on lines 111..112
pydbc/ldfListener.py on lines 113..114
pydbc/ldfListener.py on lines 115..116
pydbc/ldfListener.py on lines 117..117
pydbc/ldfListener.py on lines 118..118
pydbc/ldfListener.py on lines 119..119
pydbc/parser.py on lines 106..106
pydbc/parser.py on lines 107..107
pydbc/parser.py on lines 109..109
pydbc/parser.py on lines 110..110

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 43.

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 16 locations. Consider refactoring.
Open

        self.MESSAGE_BY_MESSAGE_ID = self.bakery(lambda session: session.query(Message).filter(Message.message_id == bindparam('message_id')))
Severity: Major
Found in pydbc/dbcListener.py and 15 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 83..83
pydbc/dbcListener.py on lines 84..85
pydbc/dbcListener.py on lines 88..88
pydbc/dbcListener.py on lines 89..89
pydbc/ldfListener.py on lines 111..112
pydbc/ldfListener.py on lines 113..114
pydbc/ldfListener.py on lines 115..116
pydbc/ldfListener.py on lines 117..117
pydbc/ldfListener.py on lines 118..118
pydbc/ldfListener.py on lines 119..119
pydbc/parser.py on lines 106..106
pydbc/parser.py on lines 107..107
pydbc/parser.py on lines 108..108
pydbc/parser.py on lines 109..109
pydbc/parser.py on lines 110..110

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 43.

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 16 locations. Consider refactoring.
Open

        self.UNCONDITIONAL_FRAME_BY_NAME = self.bakery(lambda session: session.query(LinUnconditionalFrame).filter(
            LinUnconditionalFrame.name == bindparam("name")))
Severity: Major
Found in pydbc/ldfListener.py and 15 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 82..82
pydbc/dbcListener.py on lines 83..83
pydbc/dbcListener.py on lines 84..85
pydbc/dbcListener.py on lines 88..88
pydbc/dbcListener.py on lines 89..89
pydbc/ldfListener.py on lines 113..114
pydbc/ldfListener.py on lines 115..116
pydbc/ldfListener.py on lines 117..117
pydbc/ldfListener.py on lines 118..118
pydbc/ldfListener.py on lines 119..119
pydbc/parser.py on lines 106..106
pydbc/parser.py on lines 107..107
pydbc/parser.py on lines 108..108
pydbc/parser.py on lines 109..109
pydbc/parser.py on lines 110..110

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 43.

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 16 locations. Consider refactoring.
Open

        self.LIN_SIGNAL_BY_RID = self.bakery(lambda session: session.query(LinSignal).filter(LinSignal.rid == bindparam('rid')))
Severity: Major
Found in pydbc/ldfListener.py and 15 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 82..82
pydbc/dbcListener.py on lines 83..83
pydbc/dbcListener.py on lines 84..85
pydbc/dbcListener.py on lines 88..88
pydbc/dbcListener.py on lines 89..89
pydbc/ldfListener.py on lines 111..112
pydbc/ldfListener.py on lines 113..114
pydbc/ldfListener.py on lines 115..116
pydbc/ldfListener.py on lines 117..117
pydbc/ldfListener.py on lines 118..118
pydbc/parser.py on lines 106..106
pydbc/parser.py on lines 107..107
pydbc/parser.py on lines 108..108
pydbc/parser.py on lines 109..109
pydbc/parser.py on lines 110..110

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 43.

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

    def exitRelativeAttributeDefault(self, ctx):
        name = self.getValue(ctx.n)
        value = self.getValue(ctx.v)
        ctx.value = (name, value)
Severity: Major
Found in pydbc/dbcListener.py and 1 other location - About 1 hr to fix
pydbc/dbcListener.py on lines 677..680

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 43.

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

    def exitAttributeDefault(self, ctx):
        name = self.getValue(ctx.n)
        value = self.getValue(ctx.v)
        ctx.value = (name, value)
Severity: Major
Found in pydbc/dbcListener.py and 1 other location - About 1 hr to fix
pydbc/dbcListener.py on lines 685..688

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 43.

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

        ctx.value = dict(supplierID = sid, functionID = fid, variant = v, responseErrorSignal = sn0, faultStateSignals = sn1s,
Severity: Major
Found in pydbc/ldfListener.py and 1 other location - About 1 hr to fix
pydbc/ncfListener.py on lines 93..93

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 43.

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

        ctx.value = dict(
Severity: Major
Found in pydbc/ncfListener.py and 1 other location - About 1 hr to fix
pydbc/ldfListener.py on lines 329..329

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 43.

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 3 locations. Consider refactoring.
Open

    petrolLevel = model.Signal(name = "PetrolLevel", bitsize = 8, byteorder = 1,
        sign = +1, formula_factor = 1.0, formula_offset = 0.0, minimum = 0, maximum = 255, unit = "l"
Severity: Major
Found in pydbc/examples/create_candb.py and 2 other locations - About 1 hr to fix
pydbc/examples/create_candb.py on lines 62..63
pydbc/examples/create_candb.py on lines 65..66

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 41.

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 3 locations. Consider refactoring.
Open

    engPower = model.Signal(name = "EngPower", bitsize = 16, byteorder = 1,
        sign = +1, formula_factor = 0.01, formula_offset = 0.0, minimum = 0, maximum = 150, unit = "kw"
Severity: Major
Found in pydbc/examples/create_candb.py and 2 other locations - About 1 hr to fix
pydbc/examples/create_candb.py on lines 59..60
pydbc/examples/create_candb.py on lines 65..66

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 41.

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 3 locations. Consider refactoring.
Open

        elif ctx.mid1:
            mid1 = self.getValue(ctx.mid1)
            attrValue = self.getValue(ctx.boValue)
            di = dict(attributeType = 'BO', messageID = mid1)
Severity: Major
Found in pydbc/dbcListener.py and 2 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 755..758
pydbc/dbcListener.py on lines 768..771

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 41.

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 3 locations. Consider refactoring.
Open

    engForce = model.Signal(name = "EngForce", bitsize = 16, byteorder = 1,
        sign = +1, formula_factor = 1.0, formula_offset = 0.0, minimum = 0, maximum = 0, unit = "N"
Severity: Major
Found in pydbc/examples/create_candb.py and 2 other locations - About 1 hr to fix
pydbc/examples/create_candb.py on lines 59..60
pydbc/examples/create_candb.py on lines 62..63

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 41.

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 3 locations. Consider refactoring.
Open

        if ctx.nodeName:
            nodeName = self.getValue(ctx.nodeName)
            attrValue = self.getValue(ctx.buValue)
            di = dict(attributeType = 'BU', nodeName = nodeName)
Severity: Major
Found in pydbc/dbcListener.py and 2 other locations - About 1 hr to fix
pydbc/dbcListener.py on lines 759..762
pydbc/dbcListener.py on lines 768..771

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 41.

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

Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, name, protocol_version = None, configured_NAD = None, initial_NAD = None, product_id = (),
Severity: Major
Found in pydbc/db/model.py - About 1 hr to fix

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

            elif ctx.evName:
                evName = self.getValue(ctx.evName)
                attrValue = self.getValue(ctx.evValue)
                di = dict(attributeType = 'EV', envVarname = evName)
    Severity: Major
    Found in pydbc/dbcListener.py and 2 other locations - About 1 hr to fix
    pydbc/dbcListener.py on lines 755..758
    pydbc/dbcListener.py on lines 759..762

    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 41.

    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

        @frame_id.setter
        def frame_id(self, value):
            if not (0 <= value <= 59):
                raise ValueError("'frame_id' must be in range [0 .. 59]")
            self.message_id = value
    Severity: Major
    Found in pydbc/db/model.py and 1 other location - About 1 hr to fix
    pydbc/db/model.py on lines 848..852

    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 41.

    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

        @size.setter
        def size(self, value):
            if not (1 <= value <= 8):
                raise ValueError("'size' must be in range [1 .. 8]")
            self.dlc = value
    Severity: Major
    Found in pydbc/db/model.py and 1 other location - About 1 hr to fix
    pydbc/db/model.py on lines 858..862

    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 41.

    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

    Severity
    Category
    Status
    Source
    Language