Showing 200 of 1,384 total issues
Avoid deeply nested control flow statements. Open
if svalue in _metadata[index]:
sorted_entry = _metadata[index][svalue].get(target)
if sorted_entry:
_metadata[index][value].remove(sorted_entry)
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if len(_metadata[index][value]) == 0: # pragma: no cover
del _metadata[index][value]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if not isinstance(value, Key):
if not getattr(value, 'key', None):
raise TypeError('Cannot set non-embedded entity to object without'
' a key. Got: "%s".' % value)
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if not choices: # pragma: no cover
raise RuntimeError('No template path configured.')
- Create a ticketCreate a ticket
Function fillStructure
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fillStructure(self, fill, case_sensitive=False, **kwargs):
""" If handed a dictionary, will fill self with those entries. Usually
called from ``__init__``.
- 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 k.startswith('__'): continue
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if hasattr(v, '__hooks__') and v.__hooks__:
v.__register__(target)
# attach bindings to target class
target.__aliases__, target.__bindings__ = (
- Create a ticketCreate a ticket
Function render
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def render(self, template,
- 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
Avoid deeply nested control flow statements. Open
if len(tails) == 1 and cls.EngineConfig.mode in (
RedisMode.hashkey_blob,
RedisMode.hashkind_blob):
_target_handler = cls.Operations.HASH_GET
else:
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if not _q_init: # no frame yet, initialize
_q_init = True
_data_frame = (
set((value for _, value in filter(evaluate, index))))
else: # otherwise, filter
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if subquery.sub_operator is query.OR:
_or_filters.append(subquery)
- Create a ticketCreate a ticket
Function to
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def to(cls, *targets, **options):
""" Syntactic sugar for creating an on-the-fly :py:class:`Edge` subclass.
:param target: Target :py:class:`Vertex` subclass to factory
- 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 isinstance(_path, dict) and 'compiled' in _path:
try:
choices.append(ModuleLoader(_path['compiled']))
except jinja2.TemplateNotFound: # pragma: no cover
pass # no compiled template root at all
- Create a ticketCreate a ticket
Function resolve
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def resolve(cls):
""" """
# @TODO(sgammon): figure out how to prioritize/select a runtime
- 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 _global:
_key = '.'.join((namespace, alias)) if namespace else alias
property_bucket[_key] = (responder, prop)
continue
property_bucket[_key] = (responder, prop)
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (this_value is EMPTY) or override:
self._set_option(option, value)
return self
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if concrete.__binding__:
property_bucket[concrete.__binding__.__alias__] = (
struct.CallbackProxy(do_pluck(*(
concrete,
responder,
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if 'Content-Type' not in headers:
headers['Content-Type'] = context['headers']['Content-Type'] = (
'text/html; charset=utf-8')
# call response hooks
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if prop in cls.__bindings__:
func = (
cls.__dict__[prop] if not isinstance(cls.__dict__[prop], (
staticmethod, classmethod))
else cls.__dict__[prop].__func__)
- Create a ticketCreate a ticket