Showing 69 of 69 total issues
Function _process_loop
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _process_loop(self,
event: BoboEvent,
block: BoboPatternBlock,
temp_index: int) -> bool:
"""
- 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 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Avoid deeply nested control flow statements. Open
if (msg_flags & _FLAG_RESET) == _FLAG_RESET:
d.flag_reset = False
Avoid deeply nested control flow statements. Open
if (not queue_empty) or (
d.size_stash() > 0 and
attempt_range >= self._attempt_stash
):
outlist.append((d, _TYPE_SYNC))
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
predicates: List[BoboPredicate],
group: str,
strict: bool,
loop: bool,
- 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 deeply nested control flow statements. Open
if (
(not pattern.singleton) or
(pattern.singleton and len(runs) == 0)
):
self._add_run(
Avoid deeply nested control flow statements. Open
if not task.update() and self._early_stop:
break
Avoid deeply nested control flow statements. Open
if run.is_halted():
runs_to_remove.append((
phenomenon_name, pattern_name, run.run_id))
if run.is_complete():
runs_halted_complete.append(run)
Avoid deeply nested control flow statements. Open
if attempt_range >= self._attempt_resync:
outlist.append((d, _TYPE_RESYNC))
# If device is within the "PING Period"
# and there is nothing to SYNC...
Avoid deeply nested control flow statements. Open
if runremote.run_id != runlocal.run_id:
runlocalserial = runlocal.serialize()
remlist[k] = runlocalserial
self._maybe_cache(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Avoid deeply nested control flow statements. Open
if i == 0:
remove_indices_completed.append(k)
else:
remove_indices_halted.append(k)
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
name: str,
blocks: List[BoboPatternBlock],
preconditions: List[BoboPredicate],
haltconditions: List[BoboPredicate],
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Avoid deeply nested control flow statements. Open
if attempt_range >= self._attempt_ping:
outlist.append((d, _TYPE_PING))
# If device is within the "SYNC Period"
# or "PING Period" with something left to SYNC...
Avoid deeply nested control flow statements. Open
if not self._queue_outgoing.empty():
cache_sync = self._queue_outgoing.get_nowait()
else:
cache_sync = {
_KEY_COMPLETED: [],
Avoid deeply nested control flow statements. Open
if (msg_flags & _FLAG_RESET) == _FLAG_RESET:
d.flag_reset = False
else:
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Avoid deeply nested control flow statements. Open
if (msg_flags & _FLAG_RESET) == _FLAG_RESET:
d.flag_reset = False