Showing 73 of 449 total issues
Function method_and_watch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def method_and_watch(self, method_payload, # type: coolamqp.framing.base.AMQPMethodPayload,
Avoid deeply nested control flow statements. Open
if opt[0] > tag:
break # We went too far, but it's OK, we don't need to bother with adjusting stop
else:
Function publish
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def publish(self, message, exchange=b'', routing_key=b'', span=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, declarer, queue, fut, span_parent=None, span_enqueued=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, channel, class_id, weight, body_size, properties):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, declarer, obj, fut=None, span_parent=None, span_enqueued=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, sock, on_read=lambda data: None,
Function on_close
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def on_close(self, payload=None):
# type (tp.Optional[coolamqp.framing.base.AMQPMethodPayload) -> None
"""
[EXTEND ME] Handler for channeler destruction.
- 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 add
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add(self, attache):
"""
Add an attache to this group.
If this is attached, and connection is ST_ONLINE, .attach() will be called
- 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 drain
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def drain(self, timeout, span=None, dont_trace=False): # type: (float) -> Event
"""
Return an Event.
:param timeout: time to wait for an event. 0 means return immediately. None means block forever
- 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 self.close_socket(sock_ex)
Avoid too many return
statements within this function. Open
return EpollListener
Avoid too many return
statements within this function. Open
return False