Showing 49 of 74 total issues
Function __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,action_execs,factories):
self.execs = action_execs
for e in self.execs:
for fnametuple in e.deps.function_calls:
- 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 required_parameters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def required_parameters(self):
params = []
for x in self.rules:
for p in x.params:
if p not in params:
- 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 last_occurrence
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def last_occurrence(self,node):
if node in self:
for i,x in reversed(list(enumerate(self._tour))):
if x==node:
return i
- 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 generate_actions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def generate_actions(self):
for g,n in self.items:
for _ in range(n):
for act in g.generate_actions():
yield act
- 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 sort_by_value
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def sort_by_value(_dict):
values = collections.Counter(_dict.values()).keys()
leaders = collections.defaultdict(list)
for v in values:
for k,x in _dict.items():
- 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 exec
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exec(self,match,*dicts):
for c in self.execs:
actions = c.exec(match,*dicts)
if hasattr(c,'build_variable'):
assert isinstance(actions[-1],CollectReferences)
- 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 iter_rules
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def iter_rules(self,prefix=''):
for n,m in self.iter_models(prefix):
if hasattr(m,'rules'):
for n1,r1 in m.iter_rules(prefix=n):
yield n1,r1
- 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 update_orbindex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update_orbindex(orbindex,gen):
for cyc in gen.cyclic_form():
if len(cyc)>1:
nums = [orbindex[x] for x in cyc]
keys = [x for x in orbindex if orbindex[x] in nums]
- 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 iter_models
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def iter_models(self,prefix=''):
for m in self.models:
n = add_prefix(prefix,m.name)
yield n,m
if hasattr(m,'iter_models'):
- 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"