Function _process_not_loop
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def _process_not_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
File run.py
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) 2019-2024 r3w0p
# The following code can be redistributed and/or
# modified under the terms of the MIT License.
"""
Function process
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def process(self, event: BoboEvent) -> bool:
"""
:param event: An event for the run to process.
:return: `True` if the event caused a state change in the run;
`False` otherwise.
- 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 _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 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return self._process_not_loop(event, block, temp_index)
Avoid too many return
statements within this function. Open
return self._process_loop(event, block, temp_index)
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return self._process_not_loop(event, block, temp_index)