Showing 13 of 58 total issues
Server
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class Server(object):
__metaclass__ = ABCMeta
# TODO: Make IOCPMonitor work.
Client
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Client(object):
__metaclass__ = ABCMeta
def __init__(self, address, port, socket=None, network_monitor_timeout=None, blocking_socket=True):
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, id=None, name='', path='', args='', details='', data=None, enabled=True, platform_setup=None):
Function _serve_ready_clients
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _serve_ready_clients(self, clients):
for c in clients:
try:
self.on_receive(c)
except ClientReceiveError as error:
- 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 _lower_config_keys
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _lower_config_keys(self, config):
if type(config) == list:
return [self._lower_config_keys(d) for d in config]
for k in list(config):
- 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 connect
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def connect(self):
while not self.is_stopped() and not self.is_connected():
try:
super(RadarClient, self).connect()
except Exception as e:
- 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 _run_plugin
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _run_plugin(self, plugin, address, port, message_type, checks, contacts):
Function _generate_dict_paths
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _generate_dict_paths(self, d, path=None):
if not path:
path = []
if isinstance(d, dict):
- 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, id=None, name='', email='', phone='', enabled=True):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, address, port, socket=None, network_monitor_timeout=None, blocking_socket=True):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name='', addresses=None, checks=None, contacts=None, enabled=True):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, address, port, network_monitor=None, network_monitor_timeout=None, blocking_socket=True):
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(self, address, port, message_type, checks, contacts):