eventoL/eventoL

View on GitHub

Showing 519 of 519 total issues

File views.py has 1850 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# pylint: disable=broad-except
# pylint: disable=too-many-lines

import datetime
import io
Severity: Major
Found in eventol/manager/views.py - About 5 days to fix

    File models.py has 859 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # pylint: disable=arguments-differ
    # pylint: disable=too-many-lines
    
    import datetime
    import itertools
    Severity: Major
    Found in eventol/manager/models.py - About 2 days to fix

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

      class EventUserAttendanceDate(models.Model):
          created_at = models.DateTimeField(_('Created At'), auto_now_add=True)
          updated_at = models.DateTimeField(_('Updated At'), auto_now=True)
          event_user = models.ForeignKey(EventUser, verbose_name=_noop('Event User'),
                                         blank=False, null=False)
      Severity: Major
      Found in eventol/manager/models.py and 1 other location - About 1 day to fix
      eventol/manager/models.py on lines 642..661

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

      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 AttendeeAttendanceDate(models.Model):
          created_at = models.DateTimeField(_('Created At'), auto_now_add=True)
          updated_at = models.DateTimeField(_('Updated At'), auto_now=True)
          attendee = models.ForeignKey(Attendee, verbose_name=_noop('Attendee'),
                                       blank=False, null=False)
      Severity: Major
      Found in eventol/manager/models.py and 1 other location - About 1 day to fix
      eventol/manager/models.py on lines 466..485

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

      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 EventUserSearchForm(forms.Form):
          def __init__(self, event_slug, *args, **kwargs):
              kwargs.update(initial={
                  'event_slug': event_slug,
              })
      Severity: Major
      Found in eventol/manager/forms.py and 1 other location - About 7 hrs to fix
      eventol/manager/forms.py on lines 121..136

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

      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 AttendeeSearchForm(forms.Form):
          def __init__(self, event_slug, *args, **kwargs):
              kwargs.update(initial={
                  'event_slug': event_slug,
              })
      Severity: Major
      Found in eventol/manager/forms.py and 1 other location - About 7 hrs to fix
      eventol/manager/forms.py on lines 140..154

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

      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

      Function create_event has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
      Open

      def create_event(request):
          event_form = EventForm(request.POST or None, prefix='event')
          contacts_formset = modelformset_factory(Contact, form=ContactForm, can_delete=True)
      
          # pylint: disable=unexpected-keyword-arg
      Severity: Minor
      Found in eventol/manager/views.py - About 7 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      File forms.py has 442 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # pylint: disable=too-many-ancestors
      
      import datetime
      import logging
      import uuid
      Severity: Minor
      Found in eventol/manager/forms.py - About 6 hrs to fix

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

        class EventFromEventUserFilter(admin.SimpleListFilter):
            title = _('Event')
            parameter_name = 'event_from_event_user'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class EventFromEventUserSetFilter(admin.SimpleListFilter):
            title = _('Event')
            parameter_name = 'event_from_event_user'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class HardwareFilter(admin.SimpleListFilter):
            title = _('Hardware')
            parameter_name = 'hardware'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class RoomFilter(admin.SimpleListFilter):
            title = _('Room')
            parameter_name = 'room'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class EventFromAttendeeFilter(admin.SimpleListFilter):
            title = _('Event')
            parameter_name = 'event_from_attendee'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199

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

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

        class OwnerFilter(admin.SimpleListFilter):
            title = _('Owner')
            parameter_name = 'owner_user'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class EventFilter(admin.SimpleListFilter):
            title = _('Event')
            parameter_name = 'event'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class UserFromEventUserFilter(admin.SimpleListFilter):
            title = _('User')
            parameter_name = 'user_form_event_user'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class SoftwareFilter(admin.SimpleListFilter):
            title = _('Software')
            parameter_name = 'software'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class AttendeeFilter(admin.SimpleListFilter):
            title = _('Attendee')
            parameter_name = 'attendee'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class EventFromInstallerFilter(admin.SimpleListFilter):
            title = _('Event')
            parameter_name = 'event_from_installer'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 154..167
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 202..215

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

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

        class InstallerFilter(admin.SimpleListFilter):
            title = _('Installer')
            parameter_name = 'installer'
        
            def lookups(self, request, model_admin):
        Severity: Major
        Found in eventol/manager/admin/filters.py and 11 other locations - About 5 hrs to fix
        eventol/manager/admin/filters.py on lines 17..30
        eventol/manager/admin/filters.py on lines 33..46
        eventol/manager/admin/filters.py on lines 62..75
        eventol/manager/admin/filters.py on lines 78..91
        eventol/manager/admin/filters.py on lines 94..105
        eventol/manager/admin/filters.py on lines 108..119
        eventol/manager/admin/filters.py on lines 122..135
        eventol/manager/admin/filters.py on lines 138..151
        eventol/manager/admin/filters.py on lines 170..183
        eventol/manager/admin/filters.py on lines 186..199
        eventol/manager/admin/filters.py on lines 202..215

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

        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