Showing 69 of 110 total issues
Method run_socket
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private void run_socket()
{
while(!Thread.currentThread().isInterrupted())
{
if(!is_paused)
- 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 render
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def render(pieces, style):
"""Render the given version pieces into the requested style."""
if pieces["error"]:
return {"version": "unknown",
"full-revisionid": pieces.get("long"),
- 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 process_updates
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def process_updates(self):
"""Handle additional background update loop tasks
Store a copy of all parameters so they don't disappear
- 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 render_pep440_old
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def render_pep440_old(pieces):
"""TAG[.postDISTANCE[.dev0]] .
The ".dev0" means dirty.
- 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 a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, **kwargs):
"""
Initialise the Adapter, using the provided configuration.
Create the node classes for the subscriptions to multiple ZMQ sockets.
Also create the publish socket to push frames onto.
- 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
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get(self, path, request):
"""Implementation of the HTTP GET verb for MetaListenerAdapter
:param path: URI path of the GET request
- 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 put
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def put(self, path, request):
"""
Implementation of the HTTP PUT verb for MetaListenerAdapter
- 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 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function render_image
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def render_image(self, colormap=None, clip_min=None, clip_max=None):
"""
Render an image from the image data, applying a colormap to the greyscale data.
:param colormap: Desired image colormap. if None, uses the default colormap.
- 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 clear_writers
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def clear_writers(self):
unfinished_writers = {}
for writer_name, writer in self._writers.items():
self._status_dict[writer_name] = writer.status()
if writer.finished:
- 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 uri_params_to_dictionary
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def uri_params_to_dictionary(request_command, parameters):
# Check to see if the request contains more than one item
if request_command is not None:
request_list = request_command.split('/')
logging.debug("URI request list: %s", request_list)
- 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_command
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False,
Function setup_logging
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def setup_logging(default_log_config=None,
default_level=logging.INFO,
env_key='LOG_CFG'):
"""Setup logging configuration
- 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, name, dtype, fillvalue, block_size, data_shape, block_timeout):
Function add_value
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def add_value(self, value, offset=None):
"""Add a value at the given offset
If we are caching parameters, add the value to the cache, otherwise
extend the dataset and write it directly.
- 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 deeply nested control flow statements. Open
for item in decoder_config:
self._decoder_config[index][item] = decoder_config[item]
else:
Function send_configuration
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def send_configuration(self, content, target=None, valid_error=None, timeout=1000):
msg = IpcMessage("cmd", "configure")
if target is not None:
msg.set_param(target, content)
- 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
Method addComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addComponent(Component item, Panel panel, int x, int y, GridBagConstraints c)
Method addComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addComponent(Component comp, Component label, Panel panel, int x, GridBagConstraints constraints)