Showing 52 of 197 total issues
Function exitObjectValueTables
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def exitObjectValueTables(self, ctx):
self.log_insertion("ObjectValuetables")
ctx.value = [x.value for x in ctx.items]
for table in ctx.value:
tp = table['type']
- 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 insertReceivers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def insertReceivers(self, messageId, signalId, receiver):
for rcv in receiver:
res = self.NODE_BY_NAME(self.session).params(name = rcv).first()
if res:
nodeId = res.rid
- 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 parseFile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def parseFile(pth, filetype, debug = False, remove_file = False, logLevel = "WARN"):
if filetype == FileType.DBC:
grammar = 'dbc'
start_symbol = 'dbcfile'
listenerClass = DbcListener
- 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 insertAttributeDefaults
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def insertAttributeDefaults(self, ctx):
self.log_insertion("AttributeDefaults")
defaults = {}
for item in ctx.items:
name, value = item.value
- 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 exitNode_definition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exitNode_definition(self, ctx):
name = ctx.name.value
g = ctx.g.value if ctx.g else None
d = ctx.d.value if ctx.d else None
f = ctx.f.value if ctx.d else None
- 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 insertConfigurableFrames
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def insertConfigurableFrames(self):
self.log_insertion("ConfigurableFrames")
for node, frames in self.configurableFrames.items():
for frameName, messageID in frames:
frame = self.UNCONDITIONAL_FRAME_BY_NAME(self.session).params(name = frameName).first()
- 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 insertFaultStateSignals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def insertFaultStateSignals(self):
self.log_insertion("FaultStateSignals")
for node, signals in self.faultStateSignals.items():
for signalName in signals:
signal = self.LIN_SIGNAL_BY_NAME(self.session).params(name = signalName).first()
- 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 exitGeneral_definition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exitGeneral_definition(self, ctx):
pv = ctx.pv.value
sup = ctx.sup.value
fun = ctx.fun.value
var = ctx.var.value
- 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 exitSporadic_frame_def
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exitSporadic_frame_def(self, ctx):
self.log_insertion("SporadicFrames")
ctx.value = [x.value for x in ctx.items]
for sf in ctx.value:
#print("*SPOR", sf)
- 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 __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, filename = ":memory:", debug = False, logLevel = 'INFO', create = True):
if filename == ':memory:':
self.dbname = ""
else:
if not filename.lower().endswith(DB_EXTENSION):
- 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 exitSignal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exitSignal(self, ctx):
byteOrder = self.getValue(ctx.byteOrder)
if not byteOrder in (0, 1):
self.logger.error("While parsing signal: Error while parsing signal '{}': byteorder must be either 0 or 1 -- using 0".format(ctx.signalName.value))
byteOrder = 0
- 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 exitEvent_triggered_frame_def
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exitEvent_triggered_frame_def(self, ctx):
self.log_insertion("EventTriggeredFrames")
ctx.value = [x.value for x in ctx.items]
for ef in ctx.value:
name = ef['frameName']
- 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"