KarrLab/bcforms

View on GitHub

Showing 74 of 120 total issues

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

    @l_displaced_atoms.setter
    def l_displaced_atoms(self, value):
        """ Set the left displaced atoms

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @l_monomer.setter
    def l_monomer(self, value):
        """ Set the index of the left monomer in the crosslink

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

        if not isinstance(value, float) and not isinstance(value, int) and value is not None:
            raise ValueError(':obj:`value` is not an instance of :obj:`float` or :obj:`int` or None')
Severity: Major
Found in bcforms/core.py and 1 other location - About 1 hr to fix
bcforms/core.py on lines 177..178

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

    @subunit.setter
    def subunit(self, value):
        """ Set the subunit that the atom belongs to

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @charge.setter
    def charge(self, value):
        """ Set the charge of the atom

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @element.setter
    def element(self, value):
        """ Set the element of the atom

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @subunits.setter
    def subunits(self, value):
        """ Set the subunits

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1532..1545

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

    @id.setter
    def id(self, value):
        """ Set the id of the subunit

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @order.setter
    def order(self, value):
        """ Set the order

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @r_subunit.setter
    def r_subunit(self, value):
        """ Set the name of the right subunit in the crosslink

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @r_monomer.setter
    def r_monomer(self, value):
        """ Set the index of the right monomer in the crosslink

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @crosslinks.setter
    def crosslinks(self, value):
        """ Set the crosslinks

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520

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

    @r_displaced_atoms.setter
    def r_displaced_atoms(self, value):
        """ Set the right displaced atoms

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @l_bond_atoms.setter
    def l_bond_atoms(self, value):
        """ Set the left bond atoms

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

        if not isinstance(value, EmpiricalFormula) and not isinstance(value, str) and value is not None:
            raise ValueError(':obj:`value` is not an instance of :obj:`EmpiricalFormula` or :obj:`str` or None')
Severity: Major
Found in bcforms/core.py and 1 other location - About 1 hr to fix
bcforms/core.py on lines 213..214

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

    atom_labels.append({
        'position': i_atom,
        'element': el_table.GetSymbol(structure.GetAtom(i_atom).GetAtomicNum()),
        'label': xlink_details['r_monomer'],
        'color': r_color})
Severity: Major
Found in bcforms/core.py and 1 other location - About 1 hr to fix
bcforms/core.py on lines 2370..2374

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

    @stoichiometry.setter
    def stoichiometry(self, value):
        """ Set the stoichiometry of the subunit

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1164..1177
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

    @l_subunit.setter
    def l_subunit(self, value):
        """ Set the name of the left subunit in the crosslink

        Args:
Severity: Major
Found in bcforms/core.py and 16 other locations - About 1 hr to fix
bcforms/core.py on lines 73..85
bcforms/core.py on lines 97..109
bcforms/core.py on lines 461..473
bcforms/core.py on lines 509..521
bcforms/core.py on lines 581..593
bcforms/core.py on lines 835..848
bcforms/core.py on lines 860..873
bcforms/core.py on lines 885..898
bcforms/core.py on lines 910..923
bcforms/core.py on lines 934..946
bcforms/core.py on lines 1139..1152
bcforms/core.py on lines 1214..1227
bcforms/core.py on lines 1239..1252
bcforms/core.py on lines 1289..1302
bcforms/core.py on lines 1507..1520
bcforms/core.py on lines 1532..1545

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

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

        subunit = next((subunit for subunit in self.subunits if isinstance(subunit, Subunit) and subunit.id == subunit_id), None)
Severity: Major
Found in bcforms/core.py and 1 other location - About 1 hr to fix
bcforms/core.py on lines 2061..2061

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

        subunit = next((subunit for subunit in self.subunits if isinstance(subunit, Subunit) and subunit.id == subunit_id), None)
Severity: Major
Found in bcforms/core.py and 1 other location - About 1 hr to fix
bcforms/core.py on lines 2083..2083

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language