Showing 1,373 of 3,020 total issues
Function update_engine_from_cpu
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update_engine_from_cpu(self):
"""Updates CPU values according to @cpu instance"""
for symbol in self.symbols:
if isinstance(symbol, m2_expr.ExprId):
- 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 get_master
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_master(self, node):
"""
Return the representative element of the equivalence class containing
@node
@node: ExprMem or ExprId
- 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_state_from_concrete_symb
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _update_state_from_concrete_symb(self, symbexec, cpu=True, mem=False):
if mem:
# Values will be retrieved from the concrete execution if they are
# not present
symbexec.symbols.symbols_mem.base_to_memarray.clear()
- 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 reset_class
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def reset_class(self):
for f in self.fields_order:
if f.strbits and isbin(f.strbits):
f.value = int(f.strbits, 2)
elif 'default_val' in f.kargs:
- 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 compute_immediate_dominators
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def compute_immediate_dominators(self, head):
"""Compute the immediate dominators of the graph"""
dominators = self.compute_dominators(head)
idoms = {}
- 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 gen_fields
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def gen_fields(cls, fields=None):
"""Generate the fields of this class (so that they can be accessed with
self.<field_name>) from a @fields list, as described in the class doc.
Useful in case of a type cyclic dependency. For example, the following
- 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 branch2nodes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def branch2nodes(branch, nodes=None):
if nodes is None:
nodes = []
for k, v in viewitems(branch):
if not isinstance(v, 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 get_flow_instr
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_flow_instr(self):
if not self.lines:
return None
for i in range(-1, -1 - self.lines[0].delayslot - 1, -1):
if not 0 <= i < len(self.lines):
- 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 load
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load(self):
# Library to load within Jit context
libs_to_load = []
- 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 "%s(%s)" % (func, self.from_expr(expr.args[0]))
Avoid too many return
statements within this function. Open
return '(((%s&%s) %s (%s&%s))&%s)' % (
Avoid too many return
statements within this function. Open
return "((%s)&%s)" % (
Avoid too many return
statements within this function. Open
return expr, 0
Avoid too many return
statements within this function. Open
return out
Avoid too many return
statements within this function. Open
return "%s_fp%d(%s)" % (
Avoid too many return
statements within this function. Open
return (((op1 ^ res) & (op1 ^ op2))).msb()
Avoid too many return
statements within this function. Open
return "%s(%s, %s)" % (expr.op,
Avoid too many return
statements within this function. Open
return out
Avoid too many return
statements within this function. Open
return out
Avoid too many return
statements within this function. Open
return (((op1 ^ op2) ^ res) ^ ((op1 ^ res) & (op1 ^ op2))).msb()