Showing 171 of 2,627 total issues
Avoid deeply nested control flow statements. Open
if p not in set(sink.plate_ids):
raise IncompatiblePlatesError("{} not in sink plates".format(p))
plates = sink.plates
- Create a ticketCreate a ticket
Function plot_multiple_stock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_multiple_stock(data, time=None, names=None, htype=None, title='title', ylabel=None):
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if not is_sub_plate:
raise IncompatiblePlatesError("Sink plate is not a simplification of source plate")
else:
- Create a ticketCreate a ticket
Function find_streams
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def find_streams(self, **kwargs):
"""
Finds streams with the given meta data values. Useful for debugging purposes.
:param kwargs: The meta data as keyword arguments
- Read upRead up
- Create a ticketCreate a ticket
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
if self.header:
colnames = [name.replace('\n', '') for name in line.split(',')]
del colnames[self.datetime_column]
count += 1
- Create a ticketCreate a ticket
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, workflow_id, name, description, owner, online=False, monitor=False):
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if next(p.is_root for p in sources[-1].plates):
if len(sink.plates) != 1:
raise IncompatiblePlatesError(
"Multiple sink plates defined. "
"Did you intend a simplification of 2 source plates to a sink plate?")
- Create a ticketCreate a ticket
Function _execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _execute(self, sources, interval):
found_source = False
found_data_in_source = False
for source in sources:
- Read upRead up
- Create a ticketCreate a ticket
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_tool
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_tool(self, name, parameters, version=None):
"""
Gets the tool object from the tool channel(s), and instantiates it using the tool parameters
:param name: The name or stream id for the tool in the tool channel
- Read upRead up
- Create a ticketCreate a ticket
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 create_plate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_plate(self, plate_id, description, meta_data_id, values, complement, parent_plate):
- Create a ticketCreate a ticket
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self):
self.global_plate_definitions = MetaDataTree()
self.global_plate_definitions.create_node(identifier="root")
to_be_added = dict((i, d) for i, d, in enumerate(self.global_meta_data))
- Read upRead up
- Create a ticketCreate a ticket
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 execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def execute(self, debug=False):
"""
Execute the engine - currently simple executes all workflows.
"""
- Read upRead up
- Create a ticketCreate a ticket
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 calculated_intervals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def calculated_intervals(self, value):
"""
Set the calculated intervals
This will be written to the stream_status collection if it's in the database channel
- Read upRead up
- Create a ticketCreate a ticket
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 execute
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute(self, source, splitting_stream, sinks, interval, meta_data_id, output_plate_values):
- Create a ticketCreate a ticket
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, filename_template, datetime_parser=parse,
- Create a ticketCreate a ticket
Function _execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _execute(self, source, splitting_stream, interval, meta_data_id, output_plate_values):
- Create a ticketCreate a ticket
Function _execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _execute(self, source, splitting_stream, interval, meta_data_id, output_plate_values):
- Create a ticketCreate a ticket
Function _execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _execute(self, source, splitting_stream, interval, meta_data_id, output_plate_values):
- Create a ticketCreate a ticket
Function _execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _execute(self, source, splitting_stream, interval, meta_data_id, output_plate_values):
- Create a ticketCreate a ticket
Function _execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _execute(self, source, splitting_stream, interval, meta_data_id, output_plate_values):
- Create a ticketCreate a ticket