Showing 69 of 274 total issues
Function post
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def post(self, request, *args, **kwargs):
if request.POST.get('create', None):
team = models.Team()
team.user = request.user
- Read upRead up
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
Function reimbursement_create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def reimbursement_create(sender, instance, created, *args, **kwargs):
Function user_organizer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def user_organizer(sender, instance, created, *args, **kwargs):
Function render_mail
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def render_mail(template_prefix, recipient_email, substitutions,
Function clean_draft_application
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def clean_draft_application(sender, instance, created, *args, **kwargs):
Function user_verify_email
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def user_verify_email(sender, instance, created, *args, **kwargs):
Function reimbursement_unexpire
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def reimbursement_unexpire(sender, instance, created, *args, **kwargs):
Function __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, *args, **kwargs):
super(BaseApplication, self).__init__(*args, **kwargs)
try:
dict = args[0]['dict']
except Exception:
- Read upRead up
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
Function post
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def post(self, request, *args, **kwargs):
ids = request.POST.getlist('selected')
apps = models.HackerApplication.objects.filter(pk__in=ids).all()
mails = []
errors = 0
- Read upRead up
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
Function attrition_rate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def attrition_rate(application_type):
applications = list(application_type.objects.all())
attended = 0
confirmed = 0
for a in applications:
- Read upRead up
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
Function post
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def post(self, request, *args, **kwargs):
ids = request.POST.getlist('selected')
apps = models.HackerApplication.objects.filter(user__team__team_code__in=ids).all()
mails = []
errors = 0
- Read upRead up
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
Function get_fields
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_fields(self):
result = self.get_bootstrap_field_info()
for list_fields in result.values():
sum = 0
for field in list_fields.get('fields'):
- Read upRead up
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
Avoid too many return
statements within this function. Open
return HttpResponseRedirect(reverse('sponsor_dashboard'))
Avoid too many return
statements within this function. Open
return HttpResponseRedirect(reverse('dashboard'))
Avoid too many return
statements within this function. Open
return self.request.user.has_dubious_access
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return self.request.user.has_mentor_access
Avoid too many return
statements within this function. Open
return HttpResponseRedirect(reverse('check_in_list'))
Avoid too many return
statements within this function. Open
return HttpResponseRedirect(reverse('root'))
Avoid too many return
statements within this function. Open
return None