Showing 153 of 245 total issues
Function get_hosts_from_file
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_hosts_from_file(filename,
Function decorated
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def decorated(job, host, conn, *args, **kwargs):
Function _compile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _compile(conn, filename, template, parser_kwargs, **kwargs):
Function priority_enqueue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def priority_enqueue(self, function, name, force_start, times, data):
Function start
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def start(users, hosts, func, only_authenticate=False, **kwargs):
Function priority_enqueue_or_raise
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def priority_enqueue_or_raise(self,
Function _run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _run(conn, filename, template, parser_kwargs, **kwargs):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name, lexer, parser, parent=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def init(self, *args, **kwargs):
for key in kwargs:
if key.find('.') >= 0 or key.startswith('_'):
continue
if type(kwargs[key]) == type([]):
- 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 otp
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def otp(password, seed, sequence):
"""
Calculates a one-time password hash using the given password, seed, and
sequence number and returns it.
Uses the MD4/sixword algorithm as supported by TACACS+ servers.
- 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 status
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def status(logger):
"""
Creates a one-line summary on the actions that were logged by the given
Logger.
- 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 disconnect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def disconnect(self, callback):
"""
Disconnects the signal from the given function.
:type callback: object
- 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 next_if
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def next_if(self, types, token=None):
if token is not None:
if self.current_is(types, token):
next(self)
return 1
- 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 _get_prompt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _get_prompt(self):
if self.prompt_stage == self.PROMPT_STAGE_USERNAME:
if self.login_type == self.LOGIN_TYPE_USERONLY:
self.prompt_stage = self.PROMPT_STAGE_CUSTOM
else:
- 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 _on_job_completed
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _on_job_completed(self, job, exc_info):
# This function is called in a sub-thread, so we need to be
# careful that we are not in a lock while sending an event.
self._dbg(1, 'Job "%s" called completed()' % job.name)
- 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 _domatch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _domatch(self, prompt, flush):
# Wait for a prompt.
result, match, self.response = self._expect_any(prompt, flush)
if match:
- 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 get_hosts_from_file
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_hosts_from_file(filename,
default_protocol='telnet',
default_domain='',
remove_duplicates=False,
encoding='utf-8'):
- 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 _recvline
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _recvline(self, conn):
while not b'\n' in self.buf:
r, w, x = select.select([conn], [], [], self.timeout)
if not self.running:
return None
- 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 get_user
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_user(prompt=None):
"""
Prompts the user for his login name, defaulting to the USER environment
variable. Returns a string containing the username.
May throw an exception if EOF is given by the user.
- 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"