Showing 153 of 245 total issues
Function check_channel_pty_request
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def check_channel_pty_request(self,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name, lexer, parser, parent=None, *args, **kwargs):
Function open
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def open(self, host, port=0):
"""Connect to a host.
The optional second argument is the port number, which
defaults to the standard telnet port (23).
- 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 expect_prompt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def expect_prompt(self, consume=True):
"""
Monitors the data received from the remote host and waits for a
prompt in the response. The prompt attempts to use
a sane default that works with many devices running Unix, IOS,
- 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 eval
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def eval(self, command):
"""
Evaluate the given string against all registered commands and
return the defined response.
- 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 acquire_account
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def acquire_account(self, account=None, owner=None):
"""
Waits until an account becomes available, then locks and returns it.
If an account is not passed, the next available account is returned.
- 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 netlog
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def netlog(message,
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, lexer, parser, parent):
Token.__init__(self, 'FunctionCall', lexer, parser, parent)
self.funcname = None
self.arguments = []
- 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 search_window_len > search_window_size:
clean_sw_size -= search_window_size
break
Avoid deeply nested control flow statements. Open
if not self.send_data is None:
self.send_data.write(data)
channel.send(data.encode(self.encoding))
Function acquire_account
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def acquire_account(self, account=None, owner=None):
"""
Acquires the given account. If no account is given, one is chosen
from the default pool.
- 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 skip
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def skip(app, what, name, obj, skip, options):
Function _paramiko_connect
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _paramiko_connect(self):
# Find supported address families.
addrinfo = socket.getaddrinfo(self.host, self.port)
for family, socktype, proto, canonname, sockaddr in addrinfo:
af = family
- 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 decorated
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def decorated(job, host, conn, *args, **kwargs):
Function priority_enqueue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def priority_enqueue(self,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function priority_enqueue_or_raise
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def priority_enqueue_or_raise(self,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, lexer, parser, parent, *args, **kwargs):