jardiacaj/finem_imperii

View on GitHub

Showing 218 of 336 total issues

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

        migrations.CreateModel(
            name='BattleOrganization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
Severity: Major
Found in battle/migrations/0001_initial.py and 3 other locations - About 40 mins to fix
battle/migrations/0001_initial.py on lines 34..37
battle/migrations/0001_initial.py on lines 75..78
battle/migrations/0001_initial.py on lines 102..105

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

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 conquest_proposal_context(proposal_content, context):
    context['target_tile'] = Tile.objects.get(
        id=proposal_content['tile_id'])
Severity: Major
Found in organization/views/proposal.py and 2 other locations - About 40 mins to fix
organization/views/proposal.py on lines 26..28
organization/views/proposal.py on lines 56..58

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

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

        migrations.AddField(
            model_name='battlecharacter',
            name='character',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='character.Character'),
Severity: Major
Found in battle/migrations/0002_auto_20171119_1349.py and 51 other locations - About 40 mins to fix
battle/migrations/0002_auto_20171119_1349.py on lines 22..25
battle/migrations/0002_auto_20171119_1349.py on lines 27..30
battle/migrations/0002_auto_20171119_1349.py on lines 32..35
battle/migrations/0002_auto_20171119_1349.py on lines 37..40
battle/migrations/0002_auto_20171119_1349.py on lines 42..45
battle/migrations/0002_auto_20171119_1349.py on lines 47..50
battle/migrations/0002_auto_20171119_1349.py on lines 52..55
battle/migrations/0002_auto_20171119_1349.py on lines 57..60
battle/migrations/0002_auto_20171119_1349.py on lines 62..65
battle/migrations/0002_auto_20171119_1349.py on lines 67..70
battle/migrations/0002_auto_20171119_1349.py on lines 72..75
battle/migrations/0002_auto_20171119_1349.py on lines 77..80
battle/migrations/0002_auto_20171119_1349.py on lines 82..85
battle/migrations/0002_auto_20171119_1349.py on lines 92..95
battle/migrations/0002_auto_20171119_1349.py on lines 97..100
battle/migrations/0002_auto_20171119_1349.py on lines 102..105
battle/migrations/0002_auto_20171119_1349.py on lines 107..110
battle/migrations/0002_auto_20171119_1349.py on lines 117..120
battle/migrations/0002_auto_20171119_1349.py on lines 122..125
battle/migrations/0002_auto_20171119_1349.py on lines 127..130
battle/migrations/0002_auto_20171119_1349.py on lines 132..135
battle/migrations/0002_auto_20171119_1349.py on lines 142..145
battle/migrations/0005_auto_20180819_0036.py on lines 14..17
battle/migrations/0005_auto_20180819_0036.py on lines 19..22
battle/migrations/0005_auto_20180819_0036.py on lines 24..27
battle/migrations/0005_auto_20180819_0036.py on lines 29..32
character/migrations/0002_auto_20171119_1349.py on lines 22..25
character/migrations/0002_auto_20171119_1349.py on lines 42..45
character/migrations/0003_auto_20180819_0036.py on lines 26..29
character/migrations/0003_auto_20180819_0036.py on lines 41..44
character/migrations/0003_auto_20180819_0036.py on lines 46..49
messaging/migrations/0002_auto_20171119_1349.py on lines 20..23
messaging/migrations/0002_auto_20171119_1349.py on lines 25..28
messaging/migrations/0002_auto_20171119_1349.py on lines 35..38
organization/migrations/0001_initial.py on lines 119..122
organization/migrations/0002_auto_20171119_1349.py on lines 20..23
organization/migrations/0002_auto_20171119_1349.py on lines 40..43
organization/migrations/0002_auto_20171119_1349.py on lines 45..48
organization/migrations/0002_auto_20171119_1349.py on lines 50..53
organization/migrations/0002_auto_20171119_1349.py on lines 55..58
organization/migrations/0002_auto_20171119_1349.py on lines 65..68
organization/migrations/0003_auto_20180819_0036.py on lines 14..17
organization/migrations/0003_auto_20180819_0036.py on lines 19..22
organization/migrations/0003_auto_20180819_0036.py on lines 59..62
organization/migrations/0003_auto_20180819_0036.py on lines 69..72
unit/migrations/0005_auto_20180819_0036.py on lines 14..17
world/migrations/0001_initial.py on lines 118..121
world/migrations/0001_initial.py on lines 123..126
world/migrations/0001_initial.py on lines 128..131
world/migrations/0001_initial.py on lines 158..161
world/migrations/0003_auto_20180819_0036.py on lines 60..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 34.

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

        migrations.AlterField(
            model_name='battleunit',
            name='world_unit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='unit.WorldUnit'),
Severity: Major
Found in battle/migrations/0005_auto_20180819_0036.py and 51 other locations - About 40 mins to fix
battle/migrations/0002_auto_20171119_1349.py on lines 22..25
battle/migrations/0002_auto_20171119_1349.py on lines 27..30
battle/migrations/0002_auto_20171119_1349.py on lines 32..35
battle/migrations/0002_auto_20171119_1349.py on lines 37..40
battle/migrations/0002_auto_20171119_1349.py on lines 42..45
battle/migrations/0002_auto_20171119_1349.py on lines 47..50
battle/migrations/0002_auto_20171119_1349.py on lines 52..55
battle/migrations/0002_auto_20171119_1349.py on lines 57..60
battle/migrations/0002_auto_20171119_1349.py on lines 62..65
battle/migrations/0002_auto_20171119_1349.py on lines 67..70
battle/migrations/0002_auto_20171119_1349.py on lines 72..75
battle/migrations/0002_auto_20171119_1349.py on lines 77..80
battle/migrations/0002_auto_20171119_1349.py on lines 82..85
battle/migrations/0002_auto_20171119_1349.py on lines 92..95
battle/migrations/0002_auto_20171119_1349.py on lines 97..100
battle/migrations/0002_auto_20171119_1349.py on lines 102..105
battle/migrations/0002_auto_20171119_1349.py on lines 107..110
battle/migrations/0002_auto_20171119_1349.py on lines 117..120
battle/migrations/0002_auto_20171119_1349.py on lines 122..125
battle/migrations/0002_auto_20171119_1349.py on lines 127..130
battle/migrations/0002_auto_20171119_1349.py on lines 132..135
battle/migrations/0002_auto_20171119_1349.py on lines 137..140
battle/migrations/0002_auto_20171119_1349.py on lines 142..145
battle/migrations/0005_auto_20180819_0036.py on lines 14..17
battle/migrations/0005_auto_20180819_0036.py on lines 19..22
battle/migrations/0005_auto_20180819_0036.py on lines 24..27
character/migrations/0002_auto_20171119_1349.py on lines 22..25
character/migrations/0002_auto_20171119_1349.py on lines 42..45
character/migrations/0003_auto_20180819_0036.py on lines 26..29
character/migrations/0003_auto_20180819_0036.py on lines 41..44
character/migrations/0003_auto_20180819_0036.py on lines 46..49
messaging/migrations/0002_auto_20171119_1349.py on lines 20..23
messaging/migrations/0002_auto_20171119_1349.py on lines 25..28
messaging/migrations/0002_auto_20171119_1349.py on lines 35..38
organization/migrations/0001_initial.py on lines 119..122
organization/migrations/0002_auto_20171119_1349.py on lines 20..23
organization/migrations/0002_auto_20171119_1349.py on lines 40..43
organization/migrations/0002_auto_20171119_1349.py on lines 45..48
organization/migrations/0002_auto_20171119_1349.py on lines 50..53
organization/migrations/0002_auto_20171119_1349.py on lines 55..58
organization/migrations/0002_auto_20171119_1349.py on lines 65..68
organization/migrations/0003_auto_20180819_0036.py on lines 14..17
organization/migrations/0003_auto_20180819_0036.py on lines 19..22
organization/migrations/0003_auto_20180819_0036.py on lines 59..62
organization/migrations/0003_auto_20180819_0036.py on lines 69..72
unit/migrations/0005_auto_20180819_0036.py on lines 14..17
world/migrations/0001_initial.py on lines 118..121
world/migrations/0001_initial.py on lines 123..126
world/migrations/0001_initial.py on lines 128..131
world/migrations/0001_initial.py on lines 158..161
world/migrations/0003_auto_20180819_0036.py on lines 60..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 34.

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

        migrations.AddField(
            model_name='battleturn',
            name='battle',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='battle.Battle'),
Severity: Major
Found in battle/migrations/0002_auto_20171119_1349.py and 51 other locations - About 40 mins to fix
battle/migrations/0002_auto_20171119_1349.py on lines 22..25
battle/migrations/0002_auto_20171119_1349.py on lines 32..35
battle/migrations/0002_auto_20171119_1349.py on lines 37..40
battle/migrations/0002_auto_20171119_1349.py on lines 42..45
battle/migrations/0002_auto_20171119_1349.py on lines 47..50
battle/migrations/0002_auto_20171119_1349.py on lines 52..55
battle/migrations/0002_auto_20171119_1349.py on lines 57..60
battle/migrations/0002_auto_20171119_1349.py on lines 62..65
battle/migrations/0002_auto_20171119_1349.py on lines 67..70
battle/migrations/0002_auto_20171119_1349.py on lines 72..75
battle/migrations/0002_auto_20171119_1349.py on lines 77..80
battle/migrations/0002_auto_20171119_1349.py on lines 82..85
battle/migrations/0002_auto_20171119_1349.py on lines 92..95
battle/migrations/0002_auto_20171119_1349.py on lines 97..100
battle/migrations/0002_auto_20171119_1349.py on lines 102..105
battle/migrations/0002_auto_20171119_1349.py on lines 107..110
battle/migrations/0002_auto_20171119_1349.py on lines 117..120
battle/migrations/0002_auto_20171119_1349.py on lines 122..125
battle/migrations/0002_auto_20171119_1349.py on lines 127..130
battle/migrations/0002_auto_20171119_1349.py on lines 132..135
battle/migrations/0002_auto_20171119_1349.py on lines 137..140
battle/migrations/0002_auto_20171119_1349.py on lines 142..145
battle/migrations/0005_auto_20180819_0036.py on lines 14..17
battle/migrations/0005_auto_20180819_0036.py on lines 19..22
battle/migrations/0005_auto_20180819_0036.py on lines 24..27
battle/migrations/0005_auto_20180819_0036.py on lines 29..32
character/migrations/0002_auto_20171119_1349.py on lines 22..25
character/migrations/0002_auto_20171119_1349.py on lines 42..45
character/migrations/0003_auto_20180819_0036.py on lines 26..29
character/migrations/0003_auto_20180819_0036.py on lines 41..44
character/migrations/0003_auto_20180819_0036.py on lines 46..49
messaging/migrations/0002_auto_20171119_1349.py on lines 20..23
messaging/migrations/0002_auto_20171119_1349.py on lines 25..28
messaging/migrations/0002_auto_20171119_1349.py on lines 35..38
organization/migrations/0001_initial.py on lines 119..122
organization/migrations/0002_auto_20171119_1349.py on lines 20..23
organization/migrations/0002_auto_20171119_1349.py on lines 40..43
organization/migrations/0002_auto_20171119_1349.py on lines 45..48
organization/migrations/0002_auto_20171119_1349.py on lines 50..53
organization/migrations/0002_auto_20171119_1349.py on lines 55..58
organization/migrations/0002_auto_20171119_1349.py on lines 65..68
organization/migrations/0003_auto_20180819_0036.py on lines 14..17
organization/migrations/0003_auto_20180819_0036.py on lines 19..22
organization/migrations/0003_auto_20180819_0036.py on lines 59..62
organization/migrations/0003_auto_20180819_0036.py on lines 69..72
unit/migrations/0005_auto_20180819_0036.py on lines 14..17
world/migrations/0001_initial.py on lines 118..121
world/migrations/0001_initial.py on lines 123..126
world/migrations/0001_initial.py on lines 128..131
world/migrations/0001_initial.py on lines 158..161
world/migrations/0003_auto_20180819_0036.py on lines 60..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 34.

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

        migrations.AddField(
            model_name='battlecharacterinturn',
            name='battle_turn',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='battle.BattleTurn'),
Severity: Major
Found in battle/migrations/0002_auto_20171119_1349.py and 51 other locations - About 40 mins to fix
battle/migrations/0002_auto_20171119_1349.py on lines 22..25
battle/migrations/0002_auto_20171119_1349.py on lines 27..30
battle/migrations/0002_auto_20171119_1349.py on lines 32..35
battle/migrations/0002_auto_20171119_1349.py on lines 37..40
battle/migrations/0002_auto_20171119_1349.py on lines 42..45
battle/migrations/0002_auto_20171119_1349.py on lines 47..50
battle/migrations/0002_auto_20171119_1349.py on lines 52..55
battle/migrations/0002_auto_20171119_1349.py on lines 57..60
battle/migrations/0002_auto_20171119_1349.py on lines 62..65
battle/migrations/0002_auto_20171119_1349.py on lines 67..70
battle/migrations/0002_auto_20171119_1349.py on lines 72..75
battle/migrations/0002_auto_20171119_1349.py on lines 77..80
battle/migrations/0002_auto_20171119_1349.py on lines 82..85
battle/migrations/0002_auto_20171119_1349.py on lines 92..95
battle/migrations/0002_auto_20171119_1349.py on lines 97..100
battle/migrations/0002_auto_20171119_1349.py on lines 102..105
battle/migrations/0002_auto_20171119_1349.py on lines 107..110
battle/migrations/0002_auto_20171119_1349.py on lines 117..120
battle/migrations/0002_auto_20171119_1349.py on lines 122..125
battle/migrations/0002_auto_20171119_1349.py on lines 132..135
battle/migrations/0002_auto_20171119_1349.py on lines 137..140
battle/migrations/0002_auto_20171119_1349.py on lines 142..145
battle/migrations/0005_auto_20180819_0036.py on lines 14..17
battle/migrations/0005_auto_20180819_0036.py on lines 19..22
battle/migrations/0005_auto_20180819_0036.py on lines 24..27
battle/migrations/0005_auto_20180819_0036.py on lines 29..32
character/migrations/0002_auto_20171119_1349.py on lines 22..25
character/migrations/0002_auto_20171119_1349.py on lines 42..45
character/migrations/0003_auto_20180819_0036.py on lines 26..29
character/migrations/0003_auto_20180819_0036.py on lines 41..44
character/migrations/0003_auto_20180819_0036.py on lines 46..49
messaging/migrations/0002_auto_20171119_1349.py on lines 20..23
messaging/migrations/0002_auto_20171119_1349.py on lines 25..28
messaging/migrations/0002_auto_20171119_1349.py on lines 35..38
organization/migrations/0001_initial.py on lines 119..122
organization/migrations/0002_auto_20171119_1349.py on lines 20..23
organization/migrations/0002_auto_20171119_1349.py on lines 40..43
organization/migrations/0002_auto_20171119_1349.py on lines 45..48
organization/migrations/0002_auto_20171119_1349.py on lines 50..53
organization/migrations/0002_auto_20171119_1349.py on lines 55..58
organization/migrations/0002_auto_20171119_1349.py on lines 65..68
organization/migrations/0003_auto_20180819_0036.py on lines 14..17
organization/migrations/0003_auto_20180819_0036.py on lines 19..22
organization/migrations/0003_auto_20180819_0036.py on lines 59..62
organization/migrations/0003_auto_20180819_0036.py on lines 69..72
unit/migrations/0005_auto_20180819_0036.py on lines 14..17
world/migrations/0001_initial.py on lines 118..121
world/migrations/0001_initial.py on lines 123..126
world/migrations/0001_initial.py on lines 128..131
world/migrations/0001_initial.py on lines 158..161
world/migrations/0003_auto_20180819_0036.py on lines 60..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 34.

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 ban_proposal_context(proposal_content, context):
    context['character_to_ban'] = Character.objects.get(
        id=proposal_content['character_id'])
Severity: Major
Found in organization/views/proposal.py and 2 other locations - About 40 mins to fix
organization/views/proposal.py on lines 51..53
organization/views/proposal.py on lines 56..58

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

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

    TYPE_CHOICES = (
        (RECRUIT_UNIT, RECRUIT_UNIT),
        (TRAVEL, TRAVEL),
        (PAUSE, PAUSE),
        (UNPAUSE, UNPAUSE),
Severity: Minor
Found in character/models.py and 1 other location - About 40 mins to fix
unit/models.py on lines 36..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 34.

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

                ('guilds_setting', models.CharField(choices=[('prohibit guilds', 'prohibit guilds'), ('restrict guilds', 'restrict guilds'), ('keep guilds', 'keep guilds'), ('promote guilds', 'promote guilds')], default='keep guilds', max_length=20)),
Severity: Minor
Found in world/migrations/0001_initial.py and 1 other location - About 40 mins to fix
organization/migrations/0001_initial.py on lines 47..47

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

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

    function handleTouchStartPan( event ) {

        //console.log( 'handleTouchStartPan' );

        panStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
Severity: Minor
Found in base/static/base/3rd/OrbitControls.js and 1 other location - About 35 mins to fix
base/static/base/3rd/OrbitControls.js on lines 546..552

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

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

    function handleTouchStartRotate( event ) {

        //console.log( 'handleTouchStartRotate' );

        rotateStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
Severity: Minor
Found in base/static/base/3rd/OrbitControls.js and 1 other location - About 35 mins to fix
base/static/base/3rd/OrbitControls.js on lines 567..573

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

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

        self.assertTrue(response.redirect_chain[0][0].startswith(reverse('base:home')))
Severity: Minor
Found in account/tests.py and 2 other locations - About 35 mins to fix
account/tests.py on lines 185..185
account/tests.py on lines 205..205

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

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

        self.assertTrue(response.redirect_chain[0][0].startswith(reverse('account:login')))
Severity: Minor
Found in account/tests.py and 2 other locations - About 35 mins to fix
account/tests.py on lines 205..205
account/tests.py on lines 218..218

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

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

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

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

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

Refactorings

Further Reading

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

    if target_option not in [choice[0] for choice in Settlement.GUILDS_CHOICES]:
        raise Http404("Chosen option not valid")
Severity: Minor
Found in organization/views/guilds.py and 1 other location - About 35 mins to fix
unit/views/settings.py on lines 40..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 33.

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

        self.assertTrue(response.redirect_chain[0][0].startswith(reverse('account:home')))
Severity: Minor
Found in account/tests.py and 2 other locations - About 35 mins to fix
account/tests.py on lines 185..185
account/tests.py on lines 218..218

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

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

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

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

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

Refactorings

Further Reading

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

    if battle_orders not in [order[0] for order in Order.WHAT_CHOICES]:
        raise Http404("Invalid orders")
Severity: Minor
Found in unit/views/settings.py and 1 other location - About 35 mins to fix
organization/views/guilds.py on lines 20..21

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

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

            spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) );
Severity: Minor
Found in base/static/base/3rd/OrbitControls.js and 1 other location - About 30 mins to fix
base/static/base/3rd/OrbitControls.js on lines 159..159

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

            spherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) );
Severity: Minor
Found in base/static/base/3rd/OrbitControls.js and 1 other location - About 30 mins to fix
base/static/base/3rd/OrbitControls.js on lines 148..148

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

Severity
Category
Status
Source
Language