Showing 842 of 1,379 total issues
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__(
Function packet_define_item
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def packet_define_item(self, item, format_string, read_conversion, write_conversion, id_value):
Avoid deeply nested control flow statements. Open
Open
if instance.logging_enabled and instance.filename: # Logging and file opened
# Cycle based on total time logging
if (
instance.cycle_time
and (utc_now - instance.start_time).total_seconds() > instance.cycle_time
Function info
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def info(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
Avoid deeply nested control flow statements. Open
Open
if not value.isascii():
value = "0x" + simple_formatted(value)
else:
value = f"'{str(value)}'"
else:
Function debug
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def debug(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
Function warn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def warn(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
Avoid deeply nested control flow statements. Open
Open
if len(indexes_to_clear) > 0:
for index in indexes_to_clear:
instance.cleanup_offsets[index] = None
instance.cleanup_times[index] = None
instance.cleanup_offsets = [x for x in instance.cleanup_offsets if x is not None]
Avoid deeply nested control flow statements. Open
Open
if metadata:
item["metadata"] = self.head_object(bucket=bucket, key=aws_item["Key"])
files.append(item)
Function check_bit_offset_and_size
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_bit_offset_and_size(cls, read_or_write, given_bit_offset, given_bit_size, data_type, buffer):