Showing 519 of 519 total issues
third party import from django.forms import Form
should be placed before from allauth.account.forms import ChangePasswordForm as AllAuthChangePasswordForm
Open
from django.forms import Form
- Read upRead up
- Exclude checks
Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)
Unused argument 'instance' Open
def group_names(cls, instance):
- Read upRead up
- Exclude checks
Used when a function or method argument is not used.
Unused argument 'pk' Open
def has_permission(self, user, action, pk):
- Read upRead up
- Exclude checks
Used when a function or method argument is not used.
Unable to import 'allauth.account.forms' Open
from allauth.account.forms import LoginForm as AllAuthLoginForm
- Read upRead up
- Exclude checks
Used when pylint has been unable to import a module.
third party import from django.utils.translation import ugettext as _
should be placed before from allauth.account.forms import ChangePasswordForm as AllAuthChangePasswordForm
Open
from django.utils.translation import ugettext as _
- Read upRead up
- Exclude checks
Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)
Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed. Open
def talk_registration(request, event_slug, proposal_id):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed. Open
def installation(request, event_slug):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed. Open
def attendance_by_autoreadqr(request, event_slug):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Merge this if statement with the enclosing one. Open
if not user.is_authenticated or not is_collaborator(user, event.event_slug):
- Read upRead up
- Exclude checks
Merging collapsible if
statements increases the code's readability.
Noncompliant Code Example
if condition1: if condition2: # ...
Compliant Solution
if condition1 and condition2: # ...
Merge this if statement with the enclosing one. Open
if not user.is_authenticated or not is_installer(user, event.event_slug):
- Read upRead up
- Exclude checks
Merging collapsible if
statements increases the code's readability.
Noncompliant Code Example
if condition1: if condition2: # ...
Compliant Solution
if condition1 and condition2: # ...
Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed. Open
def attendee_registration(request, event_slug):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 50 to the 15 allowed. Open
def create_event(request):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed. Open
def add_or_edit_room(request, event_slug, room_id=None):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Merge this if statement with the enclosing one. Open
if event.use_installations and is_installer(user, event.event_slug):
- Read upRead up
- Exclude checks
Merging collapsible if
statements increases the code's readability.
Noncompliant Code Example
if condition1: if condition2: # ...
Compliant Solution
if condition1 and condition2: # ...
Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed. Open
def manage_attendance(request, event_slug):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 31 to the 15 allowed. Open
def process_attendee_registration(request, event, return_url, render_template):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed. Open
def attendee_registration_by_self(request, event_slug, event_registration_code):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed. Open
def edit_event(request, event_slug):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Merge this if statement with the enclosing one. Open
if email != repeat_email:
- Read upRead up
- Exclude checks
Merging collapsible if
statements increases the code's readability.
Noncompliant Code Example
if condition1: if condition2: # ...
Compliant Solution
if condition1 and condition2: # ...