Showing 72 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
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
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
- 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
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
File settings.py
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
# pylint: disable=missing-docstring
# pylint: disable=W0232
# pylint: disable=C0103
# pylint: disable=W0611
File table.jsx
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
export const getOrganizersColumns = () => ({
Header: gettext('Organizers'),
columns: [
Function process_attendee_registration
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def process_attendee_registration(request, event, return_url, render_template):
# Verify date, allow only on event day or after
eventdate = EventDate.objects.filter(
event=event, date__lte=timezone.localdate()).order_by('-date').first()
form = AttendeeRegistrationByCollaboratorForm(
- 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 Report
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Report = props => {
const exportButtonRef = useRef(null);
const [table, setTable] = useState('confirmed');
const [autoupdate, setAutoupdate] = useState(false);
Function attendee_registration_by_self
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def attendee_registration_by_self(request, event_slug, event_registration_code):
event_index_url = reverse('index', args=[event_slug])
event = Event.objects.filter(
event_slug=event_slug, registration_code=event_registration_code
).first()
- 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 installation
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def installation(request, event_slug):
installation_form = InstallationForm(
event_slug, request.POST or None, prefix='installation')
hardware_form = HardwareForm(request.POST or None, prefix='hardware')
forms = [installation_form, hardware_form]
- 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 qrcodeInit
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
const qrcodeInit = readerId => {
const element = $(`#${readerId}`);
$.fn.extend({
html5_qrcode(qrcodeSuccess, qrcodeError, videoError) {
return element.each(() => {
Function manage_attendance
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def manage_attendance(request, event_slug):
attendee_form = AttendeeSearchForm(
event_slug,
request.POST or None
)
- 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 attendee_registration
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def attendee_registration(request, event_slug):
event = get_object_or_404(Event, event_slug=event_slug)
if not event.registration_is_open or event.registration_closed:
return render(
- 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 talk_registration
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def talk_registration(request, event_slug, proposal_id):
errors, error = [], False
event = get_object_or_404(Event, event_slug=event_slug)
proposal = get_object_or_404(Activity, pk=proposal_id)
talk_form = ActivityForm(event_slug, request.POST)
- 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 render
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {searched, searchUrl} = this.state;
const {
user,
eventolMessage,
Function getAssitanceConfirmatedColumns
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getAssitanceConfirmatedColumns = totals => {
if (!totals.hasOwnProperty('attendees')) return {};
return {
Header: gettext('Assistance (confirmed)'),
columns: [
Function add_or_edit_room
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_or_edit_room(request, event_slug, room_id=None):
event = get_object_or_404(Event, event_slug=event_slug)
room_form = RoomForm(request.POST or None)
is_edit = False
room = None
- 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 html5_qrcode
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
html5_qrcode(qrcodeSuccess, qrcodeError, videoError) {
return element.each(() => {
let height = element.height();
let width = element.width();
Function attendance_by_autoreadqr
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def attendance_by_autoreadqr(request, event_slug):
event = get_object_or_404(Event, event_slug=event_slug)
event_index_url = reverse(
'index',
args=[event_slug]
- 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
File conftest.py
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
# pylint: redefined-outer-name
# pylint: disable=too-many-arguments
from datetime import datetime
from django.db import connection