OpenC3/cosmos

View on GitHub

Showing 842 of 1,379 total issues

Function put_object has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def put_object(self, bucket, key, body, content_type=None, cache_control=None, metadata=None):
Severity: Minor
Found in openc3/python/openc3/utilities/aws_bucket.py - About 45 mins to fix

    Function append_item has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def append_item(
    Severity: Minor
    Found in openc3/python/openc3/packets/structure.py - About 45 mins to fix

      Function router_protocol_cmd has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def router_protocol_cmd(
      Severity: Minor
      Found in openc3/python/openc3/api/router_api.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if compressed:
                                    zip_file.write(compressed)
                                break
        Severity: Major
        Found in openc3/python/openc3/utilities/bucket_utilities.py - About 45 mins to fix

          Function normalize has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def normalize(cls, target_name, packet_name, item_name, type="ALL", scope=OPENC3_SCOPE):
          Severity: Minor
          Found in openc3/python/openc3/models/cvt_model.py - About 45 mins to fix

            Function read has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def read(cls, bit_offset, bit_size, data_type, buffer, endianness):
            Severity: Minor
            Found in openc3/python/openc3/accessors/binary_accessor.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              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()
              Severity: Major
              Found in openc3/python/openc3/utilities/store_implementation.py - About 45 mins to fix

                Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(
                Severity: Minor
                Found in openc3/python/openc3/io/udp_sockets.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  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 (
                  Severity: Major
                  Found in openc3/python/openc3/logs/log_writer.py - About 45 mins to fix

                    Function check_bounds_and_buffer_size has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def check_bounds_and_buffer_size(cls, bit_offset, bit_size, buffer_length, endianness, data_type):
                    Severity: Minor
                    Found in openc3/python/openc3/accessors/binary_accessor.py - About 45 mins to fix

                      Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(
                      Severity: Minor
                      Found in openc3/python/openc3/packets/packet.py - About 45 mins to fix

                        Function packet_define_item has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def packet_define_item(self, item, format_string, read_conversion, write_conversion, id_value):
                        Severity: Minor
                        Found in openc3/python/openc3/packets/packet.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          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
                          Severity: Major
                          Found in openc3/python/openc3/logs/log_writer.py - About 45 mins to fix

                            Function info has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def info(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
                            Severity: Minor
                            Found in openc3/python/openc3/utilities/logger.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if not value.isascii():
                                                          value = "0x" + simple_formatted(value)
                                                      else:
                                                          value = f"'{str(value)}'"
                                                  else:
                              Severity: Major
                              Found in openc3/python/openc3/packets/commands.py - About 45 mins to fix

                                Function debug has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def debug(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
                                Severity: Minor
                                Found in openc3/python/openc3/utilities/logger.py - About 45 mins to fix

                                  Function warn has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def warn(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
                                  Severity: Minor
                                  Found in openc3/python/openc3/utilities/logger.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    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]
                                    Severity: Major
                                    Found in openc3/python/openc3/logs/log_writer.py - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if metadata:
                                                                      item["metadata"] = self.head_object(bucket=bucket, key=aws_item["Key"])
                                                                  files.append(item)
                                      Severity: Major
                                      Found in openc3/python/openc3/utilities/aws_bucket.py - About 45 mins to fix

                                        Function check_bit_offset_and_size has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            def check_bit_offset_and_size(cls, read_or_write, given_bit_offset, given_bit_size, data_type, buffer):
                                        Severity: Minor
                                        Found in openc3/python/openc3/accessors/binary_accessor.py - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language