inasafe/inasafe

View on GitHub
safe/definitions/hazard_classifications.py

Summary

Maintainability
F
3 wks
Test Coverage

File hazard_classifications.py has 1902 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# coding=utf-8
"""Definitions relating to hazards classifications.

See https://github.com/inasafe/inasafe/issues/2920#issuecomment-229874044
to have a table showing you classes of each kind of hazard.
Severity: Major
Found in safe/definitions/hazard_classifications.py - About 5 days to fix

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

        'classes': [
    
            {
                'key': 'high',
                'value': 4,
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 1 other location - About 1 day to fix
    safe/definitions/hazard_classifications.py on lines 1296..1395

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

    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

        'classes': [
            {
                'key': 'very high',
                'value': 5,
                'color': dark_red,
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 1 other location - About 1 day to fix
    safe/definitions/hazard_classifications.py on lines 904..1003

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

    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

        'classes': [
            {
                'key': 'high',
                'value': 4,
                'color': red,
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 1 other location - About 1 day to fix
    safe/definitions/hazard_classifications.py on lines 676..730

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

    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

        'classes': [
            {
                'key': 'inundation_3',
                'value': 3,
                'color': red,
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 1 other location - About 1 day to fix
    safe/definitions/hazard_classifications.py on lines 1037..1116

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

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

            {
                'key': 'category_4',
                'value': 4,
                'color': dark_red,
                'name': tr('Category 4 (major hurricane)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 7 other locations - About 7 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1469..1502
    safe/definitions/hazard_classifications.py on lines 1507..1539
    safe/definitions/hazard_classifications.py on lines 1544..1577
    safe/definitions/hazard_classifications.py on lines 1582..1614
    safe/definitions/hazard_classifications.py on lines 1762..1795
    safe/definitions/hazard_classifications.py on lines 1800..1833
    safe/definitions/hazard_classifications.py on lines 1838..1871

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

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

            {
                'key': 'category_4',
                'value': 4,
                'color': dark_red,
                'name': tr('Category 4 (severe tropical cyclone)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 7 other locations - About 7 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1507..1539
    safe/definitions/hazard_classifications.py on lines 1544..1577
    safe/definitions/hazard_classifications.py on lines 1582..1614
    safe/definitions/hazard_classifications.py on lines 1722..1757
    safe/definitions/hazard_classifications.py on lines 1762..1795
    safe/definitions/hazard_classifications.py on lines 1800..1833
    safe/definitions/hazard_classifications.py on lines 1838..1871

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

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

            {
                'key': 'category_3',
                'value': 3,
                'color': red,
                'name': tr('Category 3 (major hurricane)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 7 other locations - About 7 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1469..1502
    safe/definitions/hazard_classifications.py on lines 1507..1539
    safe/definitions/hazard_classifications.py on lines 1544..1577
    safe/definitions/hazard_classifications.py on lines 1582..1614
    safe/definitions/hazard_classifications.py on lines 1722..1757
    safe/definitions/hazard_classifications.py on lines 1800..1833
    safe/definitions/hazard_classifications.py on lines 1838..1871

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

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

            {
                'key': 'category_3',
                'value': 3,
                'color': red,
                'name': tr('Category 3 (severe tropical cyclone)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 7 other locations - About 7 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1469..1502
    safe/definitions/hazard_classifications.py on lines 1544..1577
    safe/definitions/hazard_classifications.py on lines 1582..1614
    safe/definitions/hazard_classifications.py on lines 1722..1757
    safe/definitions/hazard_classifications.py on lines 1762..1795
    safe/definitions/hazard_classifications.py on lines 1800..1833
    safe/definitions/hazard_classifications.py on lines 1838..1871

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

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

            {
                'key': 'category_2',
                'value': 2,
                'color': orange,
                'name': tr('Category 2 (hurricane)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 7 other locations - About 7 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1469..1502
    safe/definitions/hazard_classifications.py on lines 1507..1539
    safe/definitions/hazard_classifications.py on lines 1544..1577
    safe/definitions/hazard_classifications.py on lines 1582..1614
    safe/definitions/hazard_classifications.py on lines 1722..1757
    safe/definitions/hazard_classifications.py on lines 1762..1795
    safe/definitions/hazard_classifications.py on lines 1838..1871

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

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

            {
                'key': 'category_1',
                'value': 1,
                'color': yellow,
                'name': tr('Category 1 (hurricane)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 7 other locations - About 7 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1469..1502
    safe/definitions/hazard_classifications.py on lines 1507..1539
    safe/definitions/hazard_classifications.py on lines 1544..1577
    safe/definitions/hazard_classifications.py on lines 1582..1614
    safe/definitions/hazard_classifications.py on lines 1722..1757
    safe/definitions/hazard_classifications.py on lines 1762..1795
    safe/definitions/hazard_classifications.py on lines 1800..1833

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

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

            {
                'key': 'category_2',
                'value': 2,
                'color': orange,
                'name': tr('Category 2 (tropical cyclone)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 7 other locations - About 7 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1469..1502
    safe/definitions/hazard_classifications.py on lines 1507..1539
    safe/definitions/hazard_classifications.py on lines 1582..1614
    safe/definitions/hazard_classifications.py on lines 1722..1757
    safe/definitions/hazard_classifications.py on lines 1762..1795
    safe/definitions/hazard_classifications.py on lines 1800..1833
    safe/definitions/hazard_classifications.py on lines 1838..1871

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

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

            {
                'key': 'category_1',
                'value': 1,
                'color': yellow,
                'name': tr('Category 1 (tropical cyclone)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 7 other locations - About 7 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1469..1502
    safe/definitions/hazard_classifications.py on lines 1507..1539
    safe/definitions/hazard_classifications.py on lines 1544..1577
    safe/definitions/hazard_classifications.py on lines 1722..1757
    safe/definitions/hazard_classifications.py on lines 1762..1795
    safe/definitions/hazard_classifications.py on lines 1800..1833
    safe/definitions/hazard_classifications.py on lines 1838..1871

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

    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

            {
                'key': 'category_5',
                'value': 5,
                'color': very_dark_red,
                'name': tr('Category 5 (severe tropical cyclone)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 1 other location - About 4 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1688..1717

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

    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

            {
                'key': 'category_5',
                'value': 5,
                'color': very_dark_red,
                'name': tr('Category 5 (major hurricane)'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 1 other location - About 4 hrs to fix
    safe/definitions/hazard_classifications.py on lines 1438..1464

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

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

            {
                'key': 'V',
                'value': 5,
                'color': MMI_5,
                'name': tr('V'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 166..184
    safe/definitions/hazard_classifications.py on lines 189..208
    safe/definitions/hazard_classifications.py on lines 213..233
    safe/definitions/hazard_classifications.py on lines 238..257
    safe/definitions/hazard_classifications.py on lines 262..279
    safe/definitions/hazard_classifications.py on lines 307..327
    safe/definitions/hazard_classifications.py on lines 332..352
    safe/definitions/hazard_classifications.py on lines 379..396

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

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

            {
                'key': 'I',
                'value': 1,
                'color': MMI_1,
                'name': tr('I'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 166..184
    safe/definitions/hazard_classifications.py on lines 189..208
    safe/definitions/hazard_classifications.py on lines 213..233
    safe/definitions/hazard_classifications.py on lines 238..257
    safe/definitions/hazard_classifications.py on lines 262..279
    safe/definitions/hazard_classifications.py on lines 284..302
    safe/definitions/hazard_classifications.py on lines 307..327
    safe/definitions/hazard_classifications.py on lines 332..352

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

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

            {
                'key': 'X',
                'value': 10,
                'color': MMI_10,
                'name': tr('X'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 189..208
    safe/definitions/hazard_classifications.py on lines 213..233
    safe/definitions/hazard_classifications.py on lines 238..257
    safe/definitions/hazard_classifications.py on lines 262..279
    safe/definitions/hazard_classifications.py on lines 284..302
    safe/definitions/hazard_classifications.py on lines 307..327
    safe/definitions/hazard_classifications.py on lines 332..352
    safe/definitions/hazard_classifications.py on lines 379..396

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

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

            {
                'key': 'VII',
                'value': 7,
                'color': MMI_7,
                'name': tr('VII'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 166..184
    safe/definitions/hazard_classifications.py on lines 189..208
    safe/definitions/hazard_classifications.py on lines 213..233
    safe/definitions/hazard_classifications.py on lines 262..279
    safe/definitions/hazard_classifications.py on lines 284..302
    safe/definitions/hazard_classifications.py on lines 307..327
    safe/definitions/hazard_classifications.py on lines 332..352
    safe/definitions/hazard_classifications.py on lines 379..396

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

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

            {
                'key': 'III',
                'value': 3,
                'color': MMI_3,
                'name': tr('III'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 166..184
    safe/definitions/hazard_classifications.py on lines 189..208
    safe/definitions/hazard_classifications.py on lines 213..233
    safe/definitions/hazard_classifications.py on lines 238..257
    safe/definitions/hazard_classifications.py on lines 262..279
    safe/definitions/hazard_classifications.py on lines 284..302
    safe/definitions/hazard_classifications.py on lines 307..327
    safe/definitions/hazard_classifications.py on lines 379..396

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

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

            {
                'key': 'VI',
                'value': 6,
                'color': MMI_6,
                'name': tr('VI'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 166..184
    safe/definitions/hazard_classifications.py on lines 189..208
    safe/definitions/hazard_classifications.py on lines 213..233
    safe/definitions/hazard_classifications.py on lines 238..257
    safe/definitions/hazard_classifications.py on lines 284..302
    safe/definitions/hazard_classifications.py on lines 307..327
    safe/definitions/hazard_classifications.py on lines 332..352
    safe/definitions/hazard_classifications.py on lines 379..396

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

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

            {
                'key': 'IX',
                'value': 9,
                'color': MMI_9,
                'name': tr('IX'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 166..184
    safe/definitions/hazard_classifications.py on lines 213..233
    safe/definitions/hazard_classifications.py on lines 238..257
    safe/definitions/hazard_classifications.py on lines 262..279
    safe/definitions/hazard_classifications.py on lines 284..302
    safe/definitions/hazard_classifications.py on lines 307..327
    safe/definitions/hazard_classifications.py on lines 332..352
    safe/definitions/hazard_classifications.py on lines 379..396

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

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

            {
                'key': 'IV',
                'value': 4,
                'color': MMI_4,
                'name': tr('IV'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 166..184
    safe/definitions/hazard_classifications.py on lines 189..208
    safe/definitions/hazard_classifications.py on lines 213..233
    safe/definitions/hazard_classifications.py on lines 238..257
    safe/definitions/hazard_classifications.py on lines 262..279
    safe/definitions/hazard_classifications.py on lines 284..302
    safe/definitions/hazard_classifications.py on lines 332..352
    safe/definitions/hazard_classifications.py on lines 379..396

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

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

            {
                'key': 'VIII',
                'value': 8,
                'color': MMI_8,
                'name': tr('VIII'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 8 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 166..184
    safe/definitions/hazard_classifications.py on lines 189..208
    safe/definitions/hazard_classifications.py on lines 238..257
    safe/definitions/hazard_classifications.py on lines 262..279
    safe/definitions/hazard_classifications.py on lines 284..302
    safe/definitions/hazard_classifications.py on lines 307..327
    safe/definitions/hazard_classifications.py on lines 332..352
    safe/definitions/hazard_classifications.py on lines 379..396

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
                'key': 'use_caution',
                'value': 0,
                'color': light_green,
                'name': tr('Use caution'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 2 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 591..609
    safe/definitions/hazard_classifications.py on lines 613..631

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
                'key': 'medium',
                'value': 3,
                'color': orange,
                'name': tr('Medium'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 2 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 613..631
    safe/definitions/hazard_classifications.py on lines 635..653

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
                'key': 'low',
                'value': 2,
                'color': yellow,
                'name': tr('Low'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 2 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 591..609
    safe/definitions/hazard_classifications.py on lines 635..653

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

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

            {
                'key': 'low',
                'value': 2,
                'color': yellow,
                'name': tr('Low'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 3 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 782..801
    safe/definitions/hazard_classifications.py on lines 805..824
    safe/definitions/hazard_classifications.py on lines 853..870

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

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

            {
                'key': 'high',
                'value': 4,
                'color': red,
                'name': tr('High'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 3 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 805..824
    safe/definitions/hazard_classifications.py on lines 828..849
    safe/definitions/hazard_classifications.py on lines 853..870

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

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

            {
                'key': 'medium',
                'value': 3,
                'color': orange,
                'name': tr('Medium'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 3 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 782..801
    safe/definitions/hazard_classifications.py on lines 828..849
    safe/definitions/hazard_classifications.py on lines 853..870

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

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

            {
                'key': 'very low',
                'value': 1,
                'color': light_green,
                'name': tr('Very low'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 3 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 782..801
    safe/definitions/hazard_classifications.py on lines 805..824
    safe/definitions/hazard_classifications.py on lines 828..849

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

    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

            {
                'key': 'medium',
                'color': orange,
                'value': 2,
                'name': tr('Medium'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 1 other location - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 77..92

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

    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

            {
                'key': 'high',
                'color': red,
                'value': 3,
                'name': tr('High'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 1 other location - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 96..111

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
                'key': 'high',
                'value': 3,
                'color': red,
                'name': tr('High'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 2 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 443..457
    safe/definitions/hazard_classifications.py on lines 461..475

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 44.

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

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

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

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

    Refactorings

    Further Reading

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

            {
                'key': 'low',
                'value': 1,
                'color': yellow,
                'name': tr('Low'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 2 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 425..439
    safe/definitions/hazard_classifications.py on lines 443..457

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 44.

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

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

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

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

    Refactorings

    Further Reading

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

            {
                'key': 'medium',
                'value': 2,
                'color': orange,
                'name': tr('Medium'),
    Severity: Major
    Found in safe/definitions/hazard_classifications.py and 2 other locations - About 1 hr to fix
    safe/definitions/hazard_classifications.py on lines 425..439
    safe/definitions/hazard_classifications.py on lines 461..475

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 44.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status