Showing 518 of 518 total issues
Function f
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def f(method, _id, query_params = None, payload = None, exclude_params=None):
Function f
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def f(method, _id, query_params = None, payload = None, exclude_params=None):
Function f
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def f(method, query=None, user=None, public=False, projection=None):
Function create_el
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_el(self, analysis, parent_type, parent_id, origin, uid=None):
Function try_replace_one
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def try_replace_one(db, coll_name, query, update, upsert=False):
Function exec_op
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def exec_op(self, action, _id=None, query_params=None, payload=None, exclude_params=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, cont_name, use_object_id=False, use_delete_tag=False, parent_cont_name=None, child_cont_name=None):
Function exec_op
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def exec_op(self, action, _id=None, query_params=None, payload=None, exclude_params=None):
Function f
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def f(method, _id, query_params = None, payload = None, exclude_params=None):
Function fault_tolerant_replace_one
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fault_tolerant_replace_one(db, coll_name, query, update, upsert=False):
Function send_json_http_exception
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_json_http_exception(response, message, code, request_id, custom=None):
Function undelete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def undelete(cont_name, cont_id, filename=None, include_parents=False, always_propagate=False):
Function _create_query
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _create_query(cont, cont_type, parent_type, parent_id, upload_type):
Function propagate_changes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def propagate_changes(cont_name, cont_ids, query, update, include_refs=False):
Function route
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def route(path, target, h=None, m=None, name=None):
Function validate_data
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def validate_data(data, schema_json, schema_type, verb, optional=False):
Function get_all_for_targets
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_all_for_targets(self, target_type, target_ids, user=None, projection=None, collection_id=None):
Function _get_targets
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _get_targets(project_obj, session, acquisition, type_, timestamp):
Function filter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def filter(children, criterion, _id=False):
if _id:
selectSes = '_id'
selectFil = '_id'
else:
- 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 eval_rule
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def eval_rule(rule, file_, container):
"""
Decide if a rule should spawn a job.
"""
- 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"