Showing 294 of 518 total issues
Function _append_targets
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _append_targets(self, targets, cont_name, container, prefix, total_size, total_cnt, data_path, filters):
Function process_upload
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def process_upload(request, strategy, container_type=None, id_=None, origin=None, context=None, response=None, metadata=None):
Function _mergeExampleWithRef
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
SchemaTranspiler.prototype._mergeExampleWithRef = function(schema, defs, id) {
var ref, m;
if( defs ) {
m = RE_LOCAL_REF.exec(schema.$ref);
if( m ) {
- 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 packfile_start
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def packfile_start(self, cont_name, **kwargs):
"""
Declare intent to upload a packfile to a project, and recieve an upload token identifier.
"""
- 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_all
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_all(self):
projection = self.container_handler_configurations['collections']['list_projection']
if self.superuser_request:
permchecker = always_ok
elif self.public_request:
- 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 notes_sublist
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def notes_sublist(handler, container):
"""
permissions checker for notes_sublist
"""
access = _get_access(handler.uid, container)
- 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 upsert_fileinfo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def upsert_fileinfo(cont_name, _id, fileinfo):
cont_name = containerutil.pluralize(cont_name)
_id = bson.ObjectId(_id)
- 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 upload
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def upload(self, strategy):
"""Receive a sortable reaper upload."""
if not self.superuser_request:
user = self.uid
- 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 process_file_field
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def process_file_field(self, field, file_attrs):
if self.metadata is not None:
file_mds = self.metadata.get(self.container_type, {}).get('files', [])
for file_md in file_mds:
- 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 mongo_sanitize_fields
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def mongo_sanitize_fields(d):
"""
Sanitize keys of arbitrarily structured map without flattening into dot notation
Adapted from http://stackoverflow.com/questions/8429318/how-to-use-dot-in-field-name
- 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 from_schema_path
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def from_schema_path(schema_url):
if schema_url is None:
return no_op
# split the url in base_uri and schema_name
schema, resolver = _resolve_schema(schema_url)
- 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 f
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def f(method, _id=None, payload=None, unset_payload=None, recursive=False, r_payload=None, replace_metadata=False):
Function download_ticket
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def download_ticket(ip, origin, type_, target, filename, size, projects = None):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, container_type, container, id_, metadata, timestamp, origin, context):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, container_type, container, id_, metadata, timestamp, origin, context):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, container_type, container, id_, metadata, timestamp, origin, context):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, container_type, container, id_, metadata, timestamp, origin, context):
Avoid deeply nested control flow statements. Open
if( !this.validateName(k) ) {
errors.push(new LintError('Invalid definition name: "' + k + '"', filename));
}
Avoid deeply nested control flow statements. Open
if c.get('inputs') is None:
c['inputs'] = {}
Avoid deeply nested control flow statements. Open
if y.get('_id') == self.uid:
ok = True
break