| Total Complexity | 0 |
| Total Lines | 30 |
| Duplicated Lines | 66.67 % |
| Changes | 0 | ||
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
| 1 | # -*- coding: utf-8 -*- |
||
| 2 | # Generated by Django 1.11.21 on 2019-06-14 13:00 |
||
| 3 | from __future__ import unicode_literals |
||
| 4 | |||
| 5 | import django.contrib.postgres.fields |
||
| 6 | from django.db import migrations, models |
||
| 7 | import django.db.models.deletion |
||
| 8 | |||
| 9 | |||
| 10 | View Code Duplication | class Migration(migrations.Migration): |
|
|
1 ignored issue
–
show
|
|||
| 11 | |||
| 12 | dependencies = [ |
||
| 13 | ('image_app', '0022_auto_20190614_1500'), |
||
| 14 | ('validation', '0003_auto_20190326_1133'), |
||
| 15 | ] |
||
| 16 | |||
| 17 | operations = [ |
||
| 18 | migrations.CreateModel( |
||
| 19 | name='ValidationSummary', |
||
| 20 | fields=[ |
||
| 21 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||
| 22 | ('all_count', models.PositiveIntegerField(default=0)), |
||
| 23 | ('pass_count', models.PositiveIntegerField(default=0)), |
||
| 24 | ('warning_count', models.PositiveIntegerField(default=0)), |
||
| 25 | ('error_count', models.PositiveIntegerField(default=0)), |
||
| 26 | ('json_count', models.PositiveIntegerField(default=0)), |
||
| 27 | ('type', models.CharField(blank=True, max_length=6, null=True)), |
||
| 28 | ('messages', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(blank=True, max_length=255), default=list, size=None)), |
||
| 29 | ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='image_app.Submission')), |
||
| 30 | ], |
||
| 33 |