Showing 200 of 1,384 total issues
Function __call__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, arguments, unknown=None): # pragma: no cover
""" Begins dispatching execution from a set of parsed arguments, as the
product of a :py:meth:`parser.parse_args()` call.
- 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 encode_message
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def encode_message(self, message):
""" """
message.check_initialized()
- 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 _get
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _get(self, key, **kwargs):
""" Low-level method for retrieving an entity by Key. Fetches and
deserializes the given entity, if it exists, or returns ``None``.
- 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 __call__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, *args, **kwargs):
""" Execute this local ``HookResponder``, which will dispatch the underlying
hook target, passing along any arguments and keyword arguments.
- 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 _execute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _execute(self, options=None, adapter=None, **kwargs):
""" Internal method to execute a query, optionally along with some override
options.
- 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 to_message
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def to_message(self, *args, **kwargs):
""" Convert a `Model` instance to a ProtoRPC `Message` class.
:param args: Positional arguments to pass to
- 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 allocate_ids
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def allocate_ids(cls, key_class, kind, count=1, pipeline=None):
""" Allocate new :py:class:`model.Key` IDs up to ``count``. Allocated IDs
are guaranteed not to be provisioned or otherwise used by the underlying
persistence engine, and thus can be used for uniquely identifying
- 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 __new__
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __new__(mcs, name, chain, _map):
""" Read mapped properties, store on the object, along with a reverse
mapping.
- 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 __new__
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __new__(mcs, name=None, bases=None, properties=None):
""" Construct a new ``MetaFactory`` concrete class, implementing the
``initialize`` protocol for bootstrapping meta-implementing classes
dynamically, potentially with DI-enabled MRO.
- 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 __init__
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, prop, value,
AND=None,
OR=None,
type=PROPERTY,
operator=EQUALS):
- 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 register
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def register(meta, target):
""" Register a new constructed subclass at ``target``, utilizing
``meta``'s chain.
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
def pack(self, encode=True):
""" Pack a ``QueryComponent`` object into a structure uniquely describing
the operation it specifies, that can optionally later be used to
reproduce another ``QueryComponent`` object just like it.
- 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 redirect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def redirect(cls, url=None, name=None, permanent=False, code=None,
- Create a ticketCreate a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name, basetype,
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if isinstance(v, (staticmethod, classmethod)):
v = v.__func__ # unwrap from wrapped class/static decorator
# is this a bound (i.e. dependency-injected) method?
if hasattr(v, '__binding__') and v.__binding__:
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if hasattr(v, '__binding__') and v.__binding__:
_bindings.add(k)
if v.__binding__.__alias__:
_aliases[v.__binding__.__alias__] = k
- Create a ticketCreate a ticket
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, module, sources, target, config,
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if not isinstance(_pargs, list):
_pargs = [i for i in _pargs]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if isinstance(_filter_kind, basestring) and _filter_kind in (
frozenset(('Edge', 'Vertex', 'Model'))):
# we are querying for all [edges,vertexes,models]
_filter_key = (
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if subquery.sub_operator is query.AND:
_and_filters.append(subquery)
if subquery.sub_operator is query.OR:
- Create a ticketCreate a ticket