Showing 1,194 of 1,194 total issues
Function is_admin
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_admin(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function create_event
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_event(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function is_organizer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_organizer(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function is_coorganizer_but_not_admin
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_coorganizer_but_not_admin(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function is_coorganizer_or_user_itself
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_coorganizer_or_user_itself(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function is_speaker_itself_or_admin
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_speaker_itself_or_admin(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function set_event_id
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def set_event_id(model, identifier, kwargs, attr='event_id', column_name='id'):
- Create a ticketCreate a ticket
Function auth_required
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def auth_required(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function is_owner
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_owner(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function is_session_self_submitted
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_session_self_submitted(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function is_registrar_or_user_itself
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_registrar_or_user_itself(view, view_args, view_kwargs, *args, **kwargs):
- Create a ticketCreate a ticket
Function validate_custom_form_constraints_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def validate_custom_form_constraints_request(form, schema, obj, data, excluded=None):
- Create a ticketCreate a ticket
Function send_email_with_action
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def send_email_with_action(user, action, template_name, bcc=None, **kwargs):
- Create a ticketCreate a ticket
Function safe_query_without_soft_deleted_entries
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def safe_query_without_soft_deleted_entries(
- Create a ticketCreate a ticket
Function create_service_from_json
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_service_from_json(task_handle, data, srv, event_id, service_ids=None):
- Create a ticketCreate a ticket
Function import_event_task
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def import_event_task(self, email, file, source_type, creator_id):
- Create a ticketCreate a ticket
Function before_update_object
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def before_update_object(self, discount, data, view_kwargs):
"""
Method to edit object
:param discount:
:param data:
- Read upRead up
- Create a ticketCreate a ticket
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 check_extra
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_extra(obj, data):
if not data.get('extra'):
return
channel_id = data.get('channel') or obj.channel_id
if not channel_id:
- Read upRead up
- Create a ticketCreate a ticket
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_chat_token
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_chat_token(event_id: int):
event = Event.query.get_or_404(event_id)
if not VideoStream(event_id=event.id).user_can_access:
raise NotFoundError({'source': ''}, 'Video Stream Not Found')
- Read upRead up
- Create a ticketCreate a ticket
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 create_room_virtual_room
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_room_virtual_room(
self, event: Event, videoStream: Optional[VideoStream], data
):
bot_token = data['token']
bot_id = data['res']['data']['userId']
- Read upRead up
- Create a ticketCreate a ticket
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"