Function logger_received
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def logger_received(
logger, message, log_name='log_history_info', position=None, timeout=1.0
):
"""
Check if a logger receives a message.
- 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 wait_agent_condition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def wait_agent_condition(agent, condition, *args, timeout=3, **kwargs):
Function attribute_match_all
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def attribute_match_all(
Function wait_condition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def wait_condition(condition, *args, negate=False, timeout=3, **kwargs):
Function logger_received
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def logger_received(
Avoid too many return
statements within this function. Open
return True
Function attribute_match_all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def attribute_match_all(
attribute, length=None, data=None, value=None, endswith=None
):
"""
Check if an attribute matches all of the following specified conditions:
- 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 agent_dies
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def agent_dies(agent, nsproxy, timeout=1.0):
"""
Check if an agent dies within a given period.
Parameters
- 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"