svthalia/concrexit

View on GitHub

Showing 601 of 702 total issues

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

        i1 = OrderItem.objects.create(
            order=order,
            product=self.shift.product_list.product_items.get(product=self.beer),
Severity: Major
Found in website/sales/tests/test_models.py and 13 other locations - About 55 mins to fix
website/sales/tests/test_models.py on lines 84..86
website/sales/tests/test_models.py on lines 90..92
website/sales/tests/test_models.py on lines 102..104
website/sales/tests/test_models.py on lines 108..110
website/sales/tests/test_models.py on lines 114..116
website/sales/tests/test_models.py on lines 129..131
website/sales/tests/test_models.py on lines 135..137
website/sales/tests/test_models.py on lines 141..143
website/sales/tests/test_models.py on lines 159..161
website/sales/tests/test_models.py on lines 165..167
website/sales/tests/test_models.py on lines 171..173
website/sales/tests/test_models.py on lines 213..215
website/sales/tests/test_models.py on lines 265..267

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

        OrderItem.objects.create(
            order=cls.o3,
            product=cls.shift.product_list.product_items.get(product=cls.beer),
Severity: Major
Found in website/sales/tests/test_views.py and 6 other locations - About 55 mins to fix
website/sales/tests/test_views.py on lines 59..61
website/sales/tests/test_views.py on lines 65..67
website/sales/tests/test_views.py on lines 76..78
website/sales/tests/test_views.py on lines 82..84
website/sales/tests/test_views.py on lines 88..90
website/sales/tests/test_views.py on lines 93..95

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

        i1 = OrderItem.objects.create(
            order=order,
            product=self.shift.product_list.product_items.get(product=self.beer),
Severity: Major
Found in website/sales/tests/test_models.py and 13 other locations - About 55 mins to fix
website/sales/tests/test_models.py on lines 84..86
website/sales/tests/test_models.py on lines 90..92
website/sales/tests/test_models.py on lines 102..104
website/sales/tests/test_models.py on lines 108..110
website/sales/tests/test_models.py on lines 114..116
website/sales/tests/test_models.py on lines 129..131
website/sales/tests/test_models.py on lines 135..137
website/sales/tests/test_models.py on lines 141..143
website/sales/tests/test_models.py on lines 159..161
website/sales/tests/test_models.py on lines 165..167
website/sales/tests/test_models.py on lines 171..173
website/sales/tests/test_models.py on lines 249..251
website/sales/tests/test_models.py on lines 265..267

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

        i2 = OrderItem.objects.create(
            order=order,
            product=self.shift.product_list.product_items.get(product=self.beer),
Severity: Major
Found in website/sales/tests/test_models.py and 13 other locations - About 55 mins to fix
website/sales/tests/test_models.py on lines 84..86
website/sales/tests/test_models.py on lines 102..104
website/sales/tests/test_models.py on lines 108..110
website/sales/tests/test_models.py on lines 114..116
website/sales/tests/test_models.py on lines 129..131
website/sales/tests/test_models.py on lines 135..137
website/sales/tests/test_models.py on lines 141..143
website/sales/tests/test_models.py on lines 159..161
website/sales/tests/test_models.py on lines 165..167
website/sales/tests/test_models.py on lines 171..173
website/sales/tests/test_models.py on lines 213..215
website/sales/tests/test_models.py on lines 249..251
website/sales/tests/test_models.py on lines 265..267

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

        i1 = OrderItem.objects.create(
            order=order,
            product=self.shift.product_list.product_items.get(product=self.soda),
Severity: Major
Found in website/sales/tests/test_models.py and 13 other locations - About 55 mins to fix
website/sales/tests/test_models.py on lines 84..86
website/sales/tests/test_models.py on lines 90..92
website/sales/tests/test_models.py on lines 102..104
website/sales/tests/test_models.py on lines 108..110
website/sales/tests/test_models.py on lines 114..116
website/sales/tests/test_models.py on lines 135..137
website/sales/tests/test_models.py on lines 141..143
website/sales/tests/test_models.py on lines 159..161
website/sales/tests/test_models.py on lines 165..167
website/sales/tests/test_models.py on lines 171..173
website/sales/tests/test_models.py on lines 213..215
website/sales/tests/test_models.py on lines 249..251
website/sales/tests/test_models.py on lines 265..267

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

        i3 = OrderItem.objects.create(
            order=order,
            product=self.shift.product_list.product_items.get(product=self.wine),
Severity: Major
Found in website/sales/tests/test_models.py and 13 other locations - About 55 mins to fix
website/sales/tests/test_models.py on lines 84..86
website/sales/tests/test_models.py on lines 90..92
website/sales/tests/test_models.py on lines 102..104
website/sales/tests/test_models.py on lines 108..110
website/sales/tests/test_models.py on lines 114..116
website/sales/tests/test_models.py on lines 129..131
website/sales/tests/test_models.py on lines 135..137
website/sales/tests/test_models.py on lines 141..143
website/sales/tests/test_models.py on lines 159..161
website/sales/tests/test_models.py on lines 165..167
website/sales/tests/test_models.py on lines 213..215
website/sales/tests/test_models.py on lines 249..251
website/sales/tests/test_models.py on lines 265..267

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

        OrderItem.objects.create(
            order=cls.o1,
            product=cls.shift.product_list.product_items.get(product=cls.beer),
Severity: Major
Found in website/sales/tests/test_views.py and 6 other locations - About 55 mins to fix
website/sales/tests/test_views.py on lines 65..67
website/sales/tests/test_views.py on lines 71..73
website/sales/tests/test_views.py on lines 76..78
website/sales/tests/test_views.py on lines 82..84
website/sales/tests/test_views.py on lines 88..90
website/sales/tests/test_views.py on lines 93..95

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

        OrderItem.objects.create(
            order=cls.o2,
            product=cls.shift.product_list.product_items.get(product=cls.soda),
Severity: Major
Found in website/sales/tests/test_views.py and 6 other locations - About 55 mins to fix
website/sales/tests/test_views.py on lines 59..61
website/sales/tests/test_views.py on lines 71..73
website/sales/tests/test_views.py on lines 76..78
website/sales/tests/test_views.py on lines 82..84
website/sales/tests/test_views.py on lines 88..90
website/sales/tests/test_views.py on lines 93..95

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

        i1 = OrderItem.objects.create(
            order=order,
            product=self.shift.product_list.product_items.get(product=self.soda),
Severity: Major
Found in website/sales/tests/test_models.py and 13 other locations - About 55 mins to fix
website/sales/tests/test_models.py on lines 84..86
website/sales/tests/test_models.py on lines 90..92
website/sales/tests/test_models.py on lines 108..110
website/sales/tests/test_models.py on lines 114..116
website/sales/tests/test_models.py on lines 129..131
website/sales/tests/test_models.py on lines 135..137
website/sales/tests/test_models.py on lines 141..143
website/sales/tests/test_models.py on lines 159..161
website/sales/tests/test_models.py on lines 165..167
website/sales/tests/test_models.py on lines 171..173
website/sales/tests/test_models.py on lines 213..215
website/sales/tests/test_models.py on lines 249..251
website/sales/tests/test_models.py on lines 265..267

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

        i1 = OrderItem.objects.create(
            order=order,
            product=self.shift.product_list.product_items.get(product=self.soda),
Severity: Major
Found in website/sales/tests/test_models.py and 13 other locations - About 55 mins to fix
website/sales/tests/test_models.py on lines 84..86
website/sales/tests/test_models.py on lines 90..92
website/sales/tests/test_models.py on lines 102..104
website/sales/tests/test_models.py on lines 108..110
website/sales/tests/test_models.py on lines 114..116
website/sales/tests/test_models.py on lines 129..131
website/sales/tests/test_models.py on lines 135..137
website/sales/tests/test_models.py on lines 141..143
website/sales/tests/test_models.py on lines 165..167
website/sales/tests/test_models.py on lines 171..173
website/sales/tests/test_models.py on lines 213..215
website/sales/tests/test_models.py on lines 249..251
website/sales/tests/test_models.py on lines 265..267

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

        i1 = OrderItem.objects.create(
            order=order,
            product=self.shift.product_list.product_items.get(product=self.beer),
Severity: Major
Found in website/sales/tests/test_models.py and 13 other locations - About 55 mins to fix
website/sales/tests/test_models.py on lines 84..86
website/sales/tests/test_models.py on lines 90..92
website/sales/tests/test_models.py on lines 102..104
website/sales/tests/test_models.py on lines 108..110
website/sales/tests/test_models.py on lines 114..116
website/sales/tests/test_models.py on lines 129..131
website/sales/tests/test_models.py on lines 135..137
website/sales/tests/test_models.py on lines 141..143
website/sales/tests/test_models.py on lines 159..161
website/sales/tests/test_models.py on lines 165..167
website/sales/tests/test_models.py on lines 171..173
website/sales/tests/test_models.py on lines 213..215
website/sales/tests/test_models.py on lines 249..251

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

        OrderItem.objects.create(
            order=cls.o5,
            product=cls.shift.product_list.product_items.get(product=cls.wine),
Severity: Major
Found in website/sales/tests/test_views.py and 6 other locations - About 55 mins to fix
website/sales/tests/test_views.py on lines 59..61
website/sales/tests/test_views.py on lines 65..67
website/sales/tests/test_views.py on lines 71..73
website/sales/tests/test_views.py on lines 76..78
website/sales/tests/test_views.py on lines 82..84
website/sales/tests/test_views.py on lines 88..90

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

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

        cls.renewal = Renewal.objects.create(
            member=cls.member,
            length=Entry.MEMBERSHIP_YEAR,
            membership_type=Membership.MEMBER,
            status=Entry.STATUS_REVIEW,
Severity: Minor
Found in website/registrations/tests/test_services.py and 1 other location - About 55 mins to fix
website/registrations/tests/test_views.py on lines 69..73

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

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

        membership = Membership.objects.create(
            user=self.member,
            type=Membership.MEMBER,
            since=datetime(year=2016, month=1, day=1),
Severity: Minor
Found in website/photos/tests/test_services.py and 1 other location - About 55 mins to fix
website/photos/tests/test_services.py on lines 101..104

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

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

    def get_deleted_objects(self, objs, request):
        (
            deleted_objects,
            model_count,
            perms_needed,
Severity: Minor
Found in website/photos/admin.py and 1 other location - About 55 mins to fix
website/photos/admin.py on lines 125..133

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

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

        cls.renewal = Renewal.objects.create(
            member=cls.member,
            length=Entry.MEMBERSHIP_YEAR,
            membership_type=Membership.MEMBER,
            status=Entry.STATUS_REVIEW,
Severity: Minor
Found in website/registrations/tests/test_views.py and 1 other location - About 55 mins to fix
website/registrations/tests/test_services.py on lines 95..99

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

        OrderItem.objects.create(
            order=cls.o5,
            product=cls.shift.product_list.product_items.get(product=cls.beer),
Severity: Major
Found in website/sales/tests/test_views.py and 6 other locations - About 55 mins to fix
website/sales/tests/test_views.py on lines 59..61
website/sales/tests/test_views.py on lines 65..67
website/sales/tests/test_views.py on lines 71..73
website/sales/tests/test_views.py on lines 76..78
website/sales/tests/test_views.py on lines 82..84
website/sales/tests/test_views.py on lines 93..95

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

        Membership(
            user_id=4,
            type=Membership.BENEFACTOR,
            until=date.today() + timedelta(days=1),
Severity: Major
Found in website/members/tests/test_views.py and 4 other locations - About 55 mins to fix
website/members/tests/test_views.py on lines 18..19
website/members/tests/test_views.py on lines 22..25
website/members/tests/test_views.py on lines 28..29
website/members/tests/test_views.py on lines 32..33

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

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

        membership = Membership.objects.create(
            user=self.member,
            type=Membership.MEMBER,
            since=datetime(year=2016, month=1, day=1),
Severity: Minor
Found in website/photos/tests/test_services.py and 1 other location - About 55 mins to fix
website/photos/tests/test_services.py on lines 35..38

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

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

    def get_deleted_objects(self, objs, request):
        (
            deleted_objects,
            model_count,
            perms_needed,
Severity: Minor
Found in website/photos/admin.py and 1 other location - About 55 mins to fix
website/photos/admin.py on lines 90..100

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

Severity
Category
Status
Source
Language