559Labs/django-dtg-store-manager

View on GitHub
src/business/admin.py

Summary

Maintainability
F
3 days
Test Coverage

File admin.py has 414 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from django import forms
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from .models import *
from .forms import *
Severity: Minor
Found in src/business/admin.py - About 5 hrs to fix

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

    class wooCategoryAdmin(admin.ModelAdmin):
        form = wooCategoryAdminForm
        list_display = ['id', 'date_added', 'date_updated',
                        'is_active', 'wid', 'name', 'slug',
                        'parent', 'description', 'display', 'count',
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 1 hr to fix
    src/business/admin.py on lines 211..220
    src/business/admin.py on lines 308..317

    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

    class wooVariantAdmin(admin.ModelAdmin):
        form = wooVariantAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'is_active',
                        'wid', 'date_created',
                        'permalink', 'sku', 'price', 'dimension_length',
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 1 hr to fix
    src/business/admin.py on lines 171..180
    src/business/admin.py on lines 211..220

    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

    class wooProductAdmin(admin.ModelAdmin):
        form = wooProductAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'is_active',
                        'wid', 'slug', 'permalink',
                        'date_created', 'dimension_length', 'dimension_width',
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 1 hr to fix
    src/business/admin.py on lines 171..180
    src/business/admin.py on lines 308..317

    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

    class bzCreativeCollectionAdmin(admin.ModelAdmin):
        form = bzCreativeCollectionForm
        list_display = [
            'id', 'date_added', 'date_updated',
            'code', 'name', 'bzbrand',
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 1 hr to fix
    src/business/admin.py on lines 69..77
    src/business/admin.py on lines 83..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 48.

    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

    class bzCreativeLayoutAdmin(admin.ModelAdmin):
        form = bzCreativeLayoutForm
        list_display = [
            'id', 'date_added', 'date_updated',
            'code', 'name', 'bzcreativecollection',
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 1 hr to fix
    src/business/admin.py on lines 55..63
    src/business/admin.py on lines 69..77

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

    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

    class bzCreativeDesignAdmin(admin.ModelAdmin):
        form = bzCreativeDesignForm
        list_display = [
            'id', 'date_added', 'date_updated',
            'code', 'name', 'bzcreativecollection',
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 1 hr to fix
    src/business/admin.py on lines 55..63
    src/business/admin.py on lines 83..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 48.

    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

    class wpMediaSizeAdmin(admin.ModelAdmin):
        form = wpMediaSizeAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'is_active',
                        'name', 'file', 'mime_type',
                        'width', 'height', 'source_url']
    Severity: Major
    Found in src/business/admin.py and 3 other locations - About 1 hr to fix
    src/business/admin.py on lines 289..295
    src/business/admin.py on lines 551..557
    src/business/admin.py on lines 570..575

    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

    class wooTermAdmin(admin.ModelAdmin):
        form = wooTermAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'wid', 'name',
                        'slug', 'menu_order', 'count', 'wr_tooltip', 'wr_label']
        readonly_fields = ['id', 'date_added', 'date_updated', 'wid',
    Severity: Major
    Found in src/business/admin.py and 3 other locations - About 1 hr to fix
    src/business/admin.py on lines 356..363
    src/business/admin.py on lines 551..557
    src/business/admin.py on lines 570..575

    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

    class pfCatalogProductAdmin(admin.ModelAdmin):
        form = pfCatalogProductAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'is_active',
                        'pid', 'ptype', 'brand', 'model', 'image', 'variant_count']
        readonly_fields = ['id', 'date_added', 'date_updated', 'is_active',
    Severity: Major
    Found in src/business/admin.py and 3 other locations - About 1 hr to fix
    src/business/admin.py on lines 289..295
    src/business/admin.py on lines 356..363
    src/business/admin.py on lines 570..575

    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

    class pfCatalogVariantAdmin(admin.ModelAdmin):
        form = pfCatalogVariantAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'is_active',
                        'pid', 'name', 'image', 'price', 'in_stock', 'weight']
        readonly_fields = ['id', 'date_added', 'date_updated', 'is_active',
    Severity: Major
    Found in src/business/admin.py and 3 other locations - About 1 hr to fix
    src/business/admin.py on lines 289..295
    src/business/admin.py on lines 356..363
    src/business/admin.py on lines 551..557

    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

    class wooTagAdmin(admin.ModelAdmin):
        form = wooTagAdminForm
        list_display = ['id', 'date_added', 'date_updated',
                        'is_active', 'wid', 'name', 'slug', 'description', 'count']
        readonly_fields = ['id', 'date_added', 'date_updated',
    Severity: Major
    Found in src/business/admin.py and 1 other location - About 1 hr to fix
    src/business/admin.py on lines 152..158

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 41.

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

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

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

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

    Refactorings

    Further Reading

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

    class wooAttributeAdmin(admin.ModelAdmin):
        form = wooAttributeAdminForm
        list_display = ['id', 'date_added', 'date_updated',
                        'is_active', 'wid', 'name', 'slug', 'type', 'has_archives']
        readonly_fields = ['id', 'date_added', 'date_updated',
    Severity: Major
    Found in src/business/admin.py and 1 other location - About 1 hr to fix
    src/business/admin.py on lines 270..276

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 41.

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

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

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

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

    Refactorings

    Further Reading

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

    class pfCatalogOptionTypeAdmin(admin.ModelAdmin):
        form = pfCatalogOptionTypeAdminForm
        list_display = ['id', 'date_added', 'date_updated',
                        'pid', 'title', 'type', 'additional_price']
        readonly_fields = ['id', 'date_added', 'date_updated',
    Severity: Minor
    Found in src/business/admin.py and 1 other location - About 55 mins to fix
    src/business/admin.py on lines 408..413

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

    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

    class pfSyncProductAdmin(admin.ModelAdmin):
        form = pfSyncProductAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'pid', 'external_id',
                        'variants', 'synced']
        readonly_fields = ['id', 'date_added', 'date_updated',
    Severity: Minor
    Found in src/business/admin.py and 1 other location - About 55 mins to fix
    src/business/admin.py on lines 533..538

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

    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

    class pfSyncVariantAdmin(admin.ModelAdmin):
        form = pfSyncVariantAdminForm
        list_display = ['id', 'date_added', 'date_updated',
                        'pid', 'external_id', 'synced']
        readonly_fields = ['id', 'date_added', 'date_updated',
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 45 mins to fix
    src/business/admin.py on lines 233..236
    src/business/admin.py on lines 515..520

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

    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

    class pfCatalogFileTypeAdmin(admin.ModelAdmin):
        form = pfCatalogFileTypeAdminForm
        list_display = ['id', 'date_added', 'date_updated',
                        'pid', 'title', 'additional_price']
        readonly_fields = ['id', 'date_added', 'date_updated',
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 45 mins to fix
    src/business/admin.py on lines 233..236
    src/business/admin.py on lines 426..431

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

    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

    class wooShippingClassAdmin(admin.ModelAdmin):
        form = wooShippingClassAdminForm
        list_display = ['id', 'wid', 'name', 'slug', 'description', 'count']
        readonly_fields = ['id', 'wid', 'name', 'slug', 'description', 'count']
    Severity: Major
    Found in src/business/admin.py and 2 other locations - About 45 mins to fix
    src/business/admin.py on lines 426..431
    src/business/admin.py on lines 515..520

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

    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

    class pfCountryAdmin(admin.ModelAdmin):
        form = pfCountryAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'code', 'name']
        readonly_fields = ['id', 'date_added', 'date_updated', 'code', 'name']
    Severity: Minor
    Found in src/business/admin.py and 2 other locations - About 35 mins to fix
    src/business/admin.py on lines 392..395
    src/business/admin.py on lines 444..447

    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

    class pfStateAdmin(admin.ModelAdmin):
        form = pfStateAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'code', 'name']
        readonly_fields = ['id', 'date_added', 'date_updated', 'code', 'name']
    Severity: Minor
    Found in src/business/admin.py and 2 other locations - About 35 mins to fix
    src/business/admin.py on lines 376..379
    src/business/admin.py on lines 444..447

    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

    class pfSyncItemOptionAdmin(admin.ModelAdmin):
        form = pfSyncItemOptionAdminForm
        list_display = ['id', 'date_added', 'date_updated', 'pid', 'value']
        readonly_fields = ['id', 'date_added', 'date_updated', 'pid', 'value']
    Severity: Minor
    Found in src/business/admin.py and 2 other locations - About 35 mins to fix
    src/business/admin.py on lines 376..379
    src/business/admin.py on lines 392..395

    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

    There are no issues that match your filters.

    Category
    Status