Showing 213 of 429 total issues
Function receive_debate_change
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def receive_debate_change(self, content, key, content_name, field_name, serializer):
Function add_team_ballots
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_team_ballots(self, side_tag, result, adj, scoresheet, side):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, teams, bracket, room_rank, flags=[], team_flags={}):
Function build
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def build(self, draw, teams, side_histories_before, side_histories_now, standings):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, teams, bracket, room_rank, flags=[], team_flags={}):
Function add_debate_adjudicators_column
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_debate_adjudicators_column(self, debates, title="Adjudicators",
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, teams, bracket, room_rank, flags=[], team_flags={}):
Function build
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def build(self, debates, teams, side_histories_before, side_histories_now, standings):
Function add_team_round_results
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_team_round_results(standings, rounds, opponents=False, lookup=None, id_attr='instance_id'):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, container, chair=None, panellists=None, trainees=None, from_db=False):
Function compile_grouped_means_by_gender
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def compile_grouped_means_by_gender(titles, queryset, gender_field, group_field, group_values):
Function compile_grouped_counts
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def compile_grouped_counts(title, queryset, group_field, group_values, group_labels):
Function record_added_metric
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def record_added_metric(self, key, name, abbr, icon, ascending):
Function handle_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def handle_object(self, obj, name_field, delete_func, add_func, **options):
Function get_response_dict
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_response_dict(self, request, obj, checked, event, **kwargs):
Function compile_grouped_gender_counts
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def compile_grouped_gender_counts(titles, queryset, gender_field, group_field, group_values):
Function handle_tournament
has a Cognitive Complexity of 10 (exceeds 8 allowed). Consider refactoring. Open
def handle_tournament(self, tournament, **options):
for bsub in BallotSubmission.objects.filter(debate__round__tournament=tournament):
debate_status = bsub.debate.result_status
original = (bsub.discarded, bsub.confirmed)
if debate_status == Debate.STATUS_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 update_with_validation_error
has a Cognitive Complexity of 10 (exceeds 8 allowed). Consider refactoring. Open
def update_with_validation_error(self, lineno, model, ve):
"""Adds the information in a Django ValidationError to this error."""
if hasattr(ve, 'error_dict'):
for field, error_list in list(ve.error_dict.items()):
for error in error_list:
- 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_rounds
has a Cognitive Complexity of 10 (exceeds 8 allowed). Consider refactoring. Open
def get_rounds(self, options):
"""Returns a list of rounds implied by command-line arguments.
Implementation note: For caching purposes, this stores the result in
the "__rounds__" key of the options dict."""
- 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_importer_class
has a Cognitive Complexity of 10 (exceeds 8 allowed). Consider refactoring. Open
def get_importer_class(self):
importer_spec_filepath = os.path.join(self.dirpath, ".importer")
importer_spec_arg = self.options['importer']
if not os.path.exists(importer_spec_filepath) and importer_spec_arg is 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"