christoph2/pyA2L

View on GitHub

Showing 238 of 238 total issues

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

    def __init__(self, session, name=None, module_name: str = None):
        module = get_module(session, module_name)
        self.modcommon = module.mod_common
        self.comment = self.modcommon.comment
        self.alignment = {
Severity: Minor
Found in pya2l/api/inspect.py by radon

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 __str__. (12)
Open

    def __str__(self):
        names = (
            self.comment,
            self.addrEpk,
            self.cpu or "",
Severity: Minor
Found in pya2l/api/inspect.py by radon

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 get_root_functions. (12)
Open

    @classmethod
    def get_root_functions(klass, session, ordered=False):
        """Fetch all toplevel Functions, i.e. Functions not referenced by other constructs.

        Parameters
Severity: Minor
Found in pya2l/api/inspect.py by radon

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

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

    def exitNoAxisPts4(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.NoAxisPts4(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitRipAddrY(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.RipAddrY(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitRipAddr5(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.RipAddr5(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitRipAddrZ(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.RipAddrZ(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitDistOpY(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.DistOpY(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitMaxRefresh(self, ctx):
        scalingUnit = ctx.scalingUnit.value
        rate = ctx.rate.value
        ctx.value = model.MaxRefresh(scalingUnit=scalingUnit, rate=rate)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitNoAxisPtsY(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.NoAxisPtsY(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitSystemConstant(self, ctx):
        name = ctx.name.value
        value_ = ctx.value_.value
        ctx.value = model.SystemConstant(name=name, value=value_)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitShiftOpZ(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.ShiftOpZ(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitNoRescaleX(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.NoRescaleX(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitShiftOpX(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.ShiftOpX(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitSymbolLink(self, ctx):
        symbolName = ctx.symbolName.value
        offset = ctx.offset.value
        ctx.value = model.SymbolLink(symbolName=symbolName, offset=offset)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitNoAxisPtsX(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.NoAxisPtsX(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitReserved(self, ctx):
        position = ctx.position.value
        dataSize = ctx.dataSize_.value
        ctx.value = model.Reserved(position=position, dataSize=dataSize)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitSrcAddrX(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.SrcAddrX(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitSrcAddrZ(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.SrcAddrZ(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitA2mlVersion(self, ctx):
        versionNo = ctx.versionNo.value
        upgradeNo = ctx.upgradeNo.value
        ctx.value = model.A2mlVersion(versionNo=versionNo, upgradeNo=upgradeNo)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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