Showing 1,379 of 1,379 total issues
Avoid deeply nested control flow statements. Open
Open
if timeout:
end_time = time.time()
if (start_time - end_time) > timeout:
raise TimeoutError("No Data Timeout")
# if defined? RunningScript and RunningScript.instance:
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Avoid deeply nested control flow statements. Open
Open
if isinstance(range_check_value, str):
range_check_value = f"'{range_check_value}'"
raise RuntimeError(
Avoid deeply nested control flow statements. Open
Open
if packet == "DISCONNECT":
Logger.info(
f"{self.name}: Protocol {protocol.__class__.__name__} read_packet requested disconnect"
)
return None
Function interface_protocol_cmd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def interface_protocol_cmd(
Avoid deeply nested control flow statements. Open
Open
if len(values) > 0:
MetricModel.set(json, scope=instance.scope)
# Only check whether to update at a set interval
run_time = time.time() - start_time
Function build_cmd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_cmd(
Avoid deeply nested control flow statements. Open
Open
if packet == "STOP":
break
if packet == "STOP":
Function error
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def error(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
Function put_object
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def put_object(self, bucket, key, body, content_type=None, cache_control=None, metadata=None):
Function append_item
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def append_item(
Function router_protocol_cmd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def router_protocol_cmd(
Avoid deeply nested control flow statements. Open
Open
if compressed:
zip_file.write(compressed)
break
Function normalize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def normalize(cls, target_name, packet_name, item_name, type="ALL", scope=OPENC3_SCOPE):
Function read
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def read(cls, bit_offset, bit_size, data_type, buffer, endianness):
Avoid deeply nested control flow statements. Open
Open
for msg_id, msg_hash in messages:
if isinstance(topic, bytes):
topic = topic.decode()
if isinstance(msg_id, bytes):
msg_id = msg_id.decode()
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Avoid deeply nested control flow statements. Open
Open
for index, cleanup_time in enumerate(instance.cleanup_times):
if cleanup_time <= utc_now:
# Now that the file is in S3, trim the Redis stream up until the previous file.
# This keeps one minute of data in Redis
for (
Function check_bounds_and_buffer_size
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_bounds_and_buffer_size(cls, bit_offset, bit_size, buffer_length, endianness, data_type):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(