IL2HorusTeam/il2fb-ds-config

View on GitHub

Showing 41 of 41 total issues

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'show_tail_number': field_from_ini(
                cls.show_tail_number, ini,
Severity: Major
Found in il2fb/config/ds/schemas/statistics.py and 1 other location - About 5 hrs to fix
il2fb/config/ds/schemas/misc.py on lines 45..74

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

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'difficulty': field_from_ini(
                cls.difficulty, ini,
Severity: Major
Found in il2fb/config/ds/schemas/misc.py and 1 other location - About 5 hrs to fix
il2fb/config/ds/schemas/statistics.py on lines 45..74

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

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

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

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

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

Refactorings

Further Reading

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

    def to_ini(self, ini):
        field_to_ini(self.show_tail_number, ini, 'NET', 'showPilotNumber')
        field_to_ini(self.show_ping, ini, 'NET', 'showPilotPing')
        field_to_ini(self.show_callsign, ini, 'NET', 'showPilotName')
        field_to_ini(self.show_belligerent, ini, 'NET', 'showPilotArmy')
Severity: Major
Found in il2fb/config/ds/schemas/statistics.py and 1 other location - About 5 hrs to fix
il2fb/config/ds/schemas/misc.py on lines 78..85

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

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

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

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

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

Refactorings

Further Reading

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

    def to_ini(self, ini):
        field_to_ini(self.difficulty, ini, 'NET', 'difficulty')
        field_to_ini(self.display_custom_skins, ini, 'NET', 'SkinDownload')
        field_to_ini(self.allow_custom_sounds, ini, 'NET', 'allowCustomSounds')
        field_to_ini(self.filter_user_names, ini, 'NET', 'filterUserNames')
Severity: Major
Found in il2fb/config/ds/schemas/misc.py and 1 other location - About 5 hrs to fix
il2fb/config/ds/schemas/statistics.py on lines 78..85

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

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'host': field_from_ini(
                cls.host, ini,
Severity: Major
Found in il2fb/config/ds/schemas/connection.py and 2 other locations - About 3 hrs to fix
il2fb/config/ds/schemas/anticheat/speedhack.py on lines 35..52
il2fb/config/ds/schemas/console.py on lines 93..110

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'check_server_time_speed': field_from_ini(
                cls.check_server_time_speed, ini,
Severity: Major
Found in il2fb/config/ds/schemas/anticheat/speedhack.py and 2 other locations - About 3 hrs to fix
il2fb/config/ds/schemas/connection.py on lines 35..52
il2fb/config/ds/schemas/console.py on lines 93..110

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'enabled': field_from_ini(
                cls.enabled, ini,
Severity: Major
Found in il2fb/config/ds/schemas/console.py and 2 other locations - About 3 hrs to fix
il2fb/config/ds/schemas/anticheat/speedhack.py on lines 35..52
il2fb/config/ds/schemas/connection.py on lines 35..52

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

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

    def to_ini(self, ini):
        field_to_ini(self.enabled, ini, 'Console', 'LOG')
        field_to_ini(self.file_name, ini, 'Console', 'LOGFILE')
        field_to_ini(self.log_time, ini, 'Console', 'LOGTIME')
        field_to_ini(self.keep_file, ini, 'Console', 'LOGKEEP')
Severity: Major
Found in il2fb/config/ds/schemas/console.py and 2 other locations - About 2 hrs to fix
il2fb/config/ds/schemas/anticheat/speedhack.py on lines 56..60
il2fb/config/ds/schemas/connection.py on lines 56..60

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

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

    def to_ini(self, ini):
        field_to_ini(self.check_server_time_speed, ini, 'NET', 'checkServerTimeSpeed')
        field_to_ini(self.check_client_time_speed, ini, 'NET', 'checkClientTimeSpeed')
        field_to_ini(self.max_time_difference, ini, 'NET', 'checkTimeSpeedDifferense')
        field_to_ini(self.max_time_difference_period, ini, 'NET', 'checkTimeSpeedInterval')
Severity: Major
Found in il2fb/config/ds/schemas/anticheat/speedhack.py and 2 other locations - About 2 hrs to fix
il2fb/config/ds/schemas/connection.py on lines 56..60
il2fb/config/ds/schemas/console.py on lines 114..118

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

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

    def to_ini(self, ini):
        field_to_ini(self.host, ini, 'NET', 'socksHost')
        field_to_ini(self.port, ini, 'NET', 'socksPort')
        field_to_ini(self.user, ini, 'NET', 'socksUser')
        field_to_ini(self.password, ini, 'NET', 'socksPwd')
Severity: Major
Found in il2fb/config/ds/schemas/connection.py and 2 other locations - About 2 hrs to fix
il2fb/config/ds/schemas/anticheat/speedhack.py on lines 56..60
il2fb/config/ds/schemas/console.py on lines 114..118

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

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'allow_morse_as_text': field_from_ini(
                cls.allow_morse_as_text, ini,
Severity: Major
Found in il2fb/config/ds/schemas/morse.py and 1 other location - About 2 hrs to fix
il2fb/config/ds/schemas/events.py on lines 30..43

Duplicated Code

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

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

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

Tuning

This issue has a mass of 51.

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'file_name': field_from_ini(
                cls.file_name, ini,
Severity: Major
Found in il2fb/config/ds/schemas/events.py and 1 other location - About 2 hrs to fix
il2fb/config/ds/schemas/morse.py on lines 28..41

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

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

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

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

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

Refactorings

Further Reading

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

    def to_ini(self, ini):
        field_to_ini(self.file_name, ini, 'game', 'eventlog')
        field_to_ini(self.keep_file, ini, 'game', 'eventlogkeep')
        field_to_ini(self.log_buildings, ini, 'game', 'eventlogHouse')
Severity: Major
Found in il2fb/config/ds/schemas/events.py and 1 other location - About 1 hr to fix
il2fb/config/ds/schemas/morse.py on lines 45..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 43.

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

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

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

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

Refactorings

Further Reading

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

    def to_ini(self, ini):
        field_to_ini(self.allow_morse_as_text, ini, 'NET', 'allowMorseAsText')
        field_to_ini(self.show_morse_as_text, ini, 'game', 'ShowMorseAsText')
        field_to_ini(self.block_morse_chat, ini, 'game', 'BlockMorseChat')
Severity: Major
Found in il2fb/config/ds/schemas/morse.py and 1 other location - About 1 hr to fix
il2fb/config/ds/schemas/events.py on lines 47..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 43.

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

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

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

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

Refactorings

Further Reading

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'near': field_from_ini(
                cls.near, ini,
Severity: Major
Found in il2fb/config/ds/schemas/anticheat/lags.py and 3 other locations - About 1 hr to fix
il2fb/config/ds/schemas/about.py on lines 24..33
il2fb/config/ds/schemas/console.py on lines 144..153
il2fb/config/ds/schemas/statistics.py on lines 107..116

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'max_commands': field_from_ini(
                cls.max_commands, ini,
Severity: Major
Found in il2fb/config/ds/schemas/console.py and 3 other locations - About 1 hr to fix
il2fb/config/ds/schemas/about.py on lines 24..33
il2fb/config/ds/schemas/anticheat/lags.py on lines 42..51
il2fb/config/ds/schemas/statistics.py on lines 107..116

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'show_score': field_from_ini(
                cls.show_score, ini,
Severity: Major
Found in il2fb/config/ds/schemas/statistics.py and 3 other locations - About 1 hr to fix
il2fb/config/ds/schemas/about.py on lines 24..33
il2fb/config/ds/schemas/anticheat/lags.py on lines 42..51
il2fb/config/ds/schemas/console.py on lines 144..153

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    @classmethod
    def from_ini(cls, ini):
        return cls({
            'name': field_from_ini(
                cls.name, ini,
Severity: Major
Found in il2fb/config/ds/schemas/about.py and 3 other locations - About 1 hr to fix
il2fb/config/ds/schemas/anticheat/lags.py on lines 42..51
il2fb/config/ds/schemas/console.py on lines 144..153
il2fb/config/ds/schemas/statistics.py on lines 107..116

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

    @classmethod
    def default(cls):
        return cls({
            field_name: field.default
            for field_name, field in cls.fields.items()
Severity: Major
Found in il2fb/config/ds/schemas/statistics.py and 13 other locations - About 50 mins to fix
il2fb/config/ds/schemas/about.py on lines 41..45
il2fb/config/ds/schemas/anticheat/lags.py on lines 59..63
il2fb/config/ds/schemas/anticheat/lags.py on lines 111..115
il2fb/config/ds/schemas/anticheat/speedhack.py on lines 62..66
il2fb/config/ds/schemas/connection.py on lines 62..66
il2fb/config/ds/schemas/console.py on lines 120..124
il2fb/config/ds/schemas/console.py on lines 161..165
il2fb/config/ds/schemas/events.py on lines 52..56
il2fb/config/ds/schemas/hud.py on lines 52..56
il2fb/config/ds/schemas/misc.py on lines 87..91
il2fb/config/ds/schemas/morse.py on lines 50..54
il2fb/config/ds/schemas/refly.py on lines 77..81
il2fb/config/ds/schemas/statistics.py on lines 87..91

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

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

    @classmethod
    def default(cls):
        return cls({
            field_name: field.default
            for field_name, field in cls.fields.items()
Severity: Major
Found in il2fb/config/ds/schemas/anticheat/lags.py and 13 other locations - About 50 mins to fix
il2fb/config/ds/schemas/about.py on lines 41..45
il2fb/config/ds/schemas/anticheat/lags.py on lines 111..115
il2fb/config/ds/schemas/anticheat/speedhack.py on lines 62..66
il2fb/config/ds/schemas/connection.py on lines 62..66
il2fb/config/ds/schemas/console.py on lines 120..124
il2fb/config/ds/schemas/console.py on lines 161..165
il2fb/config/ds/schemas/events.py on lines 52..56
il2fb/config/ds/schemas/hud.py on lines 52..56
il2fb/config/ds/schemas/misc.py on lines 87..91
il2fb/config/ds/schemas/morse.py on lines 50..54
il2fb/config/ds/schemas/refly.py on lines 77..81
il2fb/config/ds/schemas/statistics.py on lines 87..91
il2fb/config/ds/schemas/statistics.py on lines 124..128

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

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