Showing 88 of 149 total issues
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(self, port=None, server=None, debug=None, host=None, **options): # pragma: no cover
Function _query_args_helper
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _query_args_helper(self, query_defns, query_arguments,
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(self, port=None, server=None, debug=None, host=None, **options): # pragma: no cover
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, formdata_parameters, query_parameters, title=None, detail=None, **kwargs):
Function update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update(self, id=None, name=None, animal_type=None, tags=None, created=None):
Function resolve_form
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def resolve_form(self, form_data):
if self._body_schema is None or self._body_schema.get('type') != 'object':
return form_data
for k in form_data:
encoding = self._body_encoding.get(k, {"style": "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 validate_response
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate_response(self, data, status_code, headers, url):
"""
Validates the Response object based on what has been declared in the specification.
Ensures the response body matches the declated schema.
:type data: 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 _serialize_data
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _serialize_data(cls, data, mimetype):
# TODO: Harmonize with flask_api. Currently this is the backwards compatible with aiohttp_api._cast_body.
if not isinstance(data, bytes):
if isinstance(mimetype, str) and is_json_mimetype(mimetype):
body = cls.jsonifier.dumps(data)
- 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 verify_security
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def verify_security(cls, auth_funcs, required_scopes, function):
@functools.wraps(function)
def wrapper(request):
token_info = None
for func in auth_funcs:
- 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 validate_server_requirements
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate_server_requirements(ctx, param, value):
if value == 'gevent':
try:
import gevent # NOQA
except ImportError:
- 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 resolve_operation_id_using_rest_semantics
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def resolve_operation_id_using_rest_semantics(self, operation):
"""
Resolves the operationId using REST semantics
:type operation: connexion.operations.AbstractOperation
- 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 extend_with_set_default
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def extend_with_set_default(validator_class):
validate_properties = validator_class.VALIDATORS['properties']
def set_defaults(validator, properties, instance, schema):
for property, subschema in six.iteritems(properties):
- 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
Avoid too many return
statements within this function. Open
return cls._build_response(mimetype=mimetype, data=response, extra_context=extra_context)
Avoid too many return
statements within this function. Open
return (None, status_code)
Avoid too many return
statements within this function. Open
return value
Avoid too many return
statements within this function. Open
return cls._build_response(mimetype=mimetype, data=data, status_code=status_code, headers=headers, extra_context=extra_context)
Avoid too many return
statements within this function. Open
return {}
Avoid too many return
statements within this function. Open
return json.JSONEncoder.default(self, o)
Avoid too many return
statements within this function. Open
return json.JSONEncoder.default(self, o)