Showing 200 of 1,384 total issues
Avoid deeply nested control flow statements. Open
if hasattr(obj, property_name):
return getattr(obj, property_name) # pragma: nocover
- Create a ticketCreate a ticket
Function pack
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def pack(self, encode=True):
""" Pack this set of ``QueryOptions`` into a string describing the
constituent settings it contains.
- 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 pack
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def pack(self, encode=True):
""" Pack this ``Query`` instance into a structure uniquely describing it,
with the ability to optionally expand that into a ``Query`` object
representing the same operations.
- 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
Avoid deeply nested control flow statements. Open
if klass.__binding__ and klass.__binding__.__alias__:
parent_ref = '.'.join((
klass.__binding__.__alias__, property_name))
if parent_ref in pool:
return pool[parent_ref]
- Create a ticketCreate a ticket
Function __enter__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __enter__(self):
""" Context entrance method, responsible for triggering a load of the top-
level package and propagating exceptions if ``strict`` mode is active.
- 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 prepare
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def prepare(mcs, target):
""" Prepare ``target`` (usually ``cls``) for injection, possibly resolving
a global singleton object to be returned upon matching attribute
requests.
- 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
Avoid deeply nested control flow statements. Open
if hasattr(klass, '__aliases__') and (
property_name in klass.__aliases__):
return getattr(obj, klass.__aliases__[property_name])
if hasattr(obj, property_name):
- Create a ticketCreate a ticket
Function run
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(output=None,
- Create a ticketCreate a ticket
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, prop, value,
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if not isinstance(bundle, tuple): # pragma: no cover
_key = '.'.join((namespace, bundle)) if namespace else bundle
property_bucket[_key] = (responder, bundle)
continue
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if not (isinstance(value, (model.Key, model.Model)) or (
isinstance(value, type) and issubclass(value, model.Model)) or (
value is None)):
raise ValueError('`KeyFilter` value must be a `Key`, model class,'
' or `None`. Instead, got: "%s".' % repr(value))
- Create a ticketCreate a ticket
Function render
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def render(self, handler, config, template, ctx, _direct=False):
- Create a ticketCreate a ticket
Function execute_query
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute_query(cls, kind, spec, options, **kwargs): # pragma: no cover
- Create a ticketCreate a ticket
Function execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute(cls, operation, kind, *args, **kwargs):
- Create a ticketCreate a ticket
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(app=None,
- Create a ticketCreate a ticket
Function commit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def commit(self, status, headers, request, http, response):
- Create a ticketCreate a ticket
Function put
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def put(cls, key, entity, model, pipeline=None):
- Create a ticketCreate a ticket
Function allocate_ids
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def allocate_ids(cls, key_class, kind, count=1, pipeline=None):
- Create a ticketCreate a ticket
Function write_indexes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def write_indexes(cls, w, g, pipeline=None, execute=True):
- Create a ticketCreate a ticket
Function establish
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def establish(self, environ, endpoint, arguments, request, http):
- Create a ticketCreate a ticket