svthalia/concrexit

View on GitHub

Showing 601 of 702 total issues

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

    send_email(
        to=[member.email],
        subject="Please confirm your email change",
        txt_template="members/email/email_change_confirm.txt",
        html_template="members/email/email_change_confirm.html",
Severity: Minor
Found in website/members/emails.py and 1 other location - About 35 mins to fix
website/members/emails.py on lines 195..202

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

        with self.subTest(
            membership_since=membership.since, membership_until=membership.until
        ):
            self.assertTrue(is_album_accessible(request, album))
Severity: Minor
Found in website/photos/tests/test_services.py and 2 other locations - About 35 mins to fix
website/photos/tests/test_services.py on lines 42..45
website/photos/tests/test_services.py on lines 51..54

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

        send_email.assert_called_once_with(
            to=[settings.BOARD_NOTIFICATION_ADDRESS],
            subject="New renewal",
            txt_template="registrations/email/renewal_board.txt",
            html_template="registrations/email/renewal_board.html",
Severity: Minor
Found in website/registrations/tests/test_emails.py and 1 other location - About 35 mins to fix
website/registrations/tests/test_emails.py on lines 296..305

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

        with self.subTest(
            membership_since=membership.since, membership_until=membership.until
        ):
            self.assertTrue(is_album_accessible(request, album))
Severity: Minor
Found in website/photos/tests/test_services.py and 2 other locations - About 35 mins to fix
website/photos/tests/test_services.py on lines 51..54
website/photos/tests/test_services.py on lines 60..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

        with self.subTest(
            membership_since=membership.since, membership_until=membership.until
        ):
            self.assertFalse(is_album_accessible(request, album))
Severity: Minor
Found in website/photos/tests/test_services.py and 2 other locations - About 35 mins to fix
website/photos/tests/test_services.py on lines 42..45
website/photos/tests/test_services.py on lines 60..63

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    send_email(
        to=[change_request.email],
        subject="Please verify your email address",
        txt_template="members/email/email_change_verify.txt",
        html_template="members/email/email_change_verify.html",
Severity: Minor
Found in website/members/emails.py and 1 other location - About 35 mins to fix
website/members/emails.py on lines 180..187

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

Avoid too many return statements within this function.
Open

                return status.STATUS_CANCELLED_LATE
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return status.STATUS_OPEN
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

                return redirect("pizzas:index")
Severity: Major
Found in website/pizzas/views.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return status.STATUS_WAITINGLIST
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return status.STATUS_EXPIRED
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return False
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return status.STATUS_CANCELLED_FINAL
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return status.STATUS_OPTIONAL_REGISTERED
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return status.STATUS_FULL
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return status.STATUS_REGISTERED
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return status.STATUS_OPTIONAL
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

                return status.STATUS_CANCELLED
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return status.STATUS_WILL_OPEN
Severity: Major
Found in website/events/services.py - About 30 mins to fix

Avoid too many return statements within this function.
Open

    return redirect("pizzas:index")
Severity: Major
Found in website/pizzas/views.py - About 30 mins to fix
Severity
Category
Status
Source
Language