OpenC3/cosmos

View on GitHub

Showing 1,379 of 1,379 total issues

Avoid deeply nested control flow statements.
Open

                        if timeout:
                            end_time = time.time()
                            if (start_time - end_time) > timeout:
                                raise TimeoutError("No Data Timeout")
                        # if defined? RunningScript and RunningScript.instance:
Severity: Major
Found in openc3/python/openc3/script/web_socket_api.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/interfaces/tcpip_server_interface.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if isinstance(range_check_value, str):
                                  range_check_value = f"'{range_check_value}'"
                              raise RuntimeError(
      Severity: Major
      Found in openc3/python/openc3/packets/commands.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if packet == "DISCONNECT":
                                    Logger.info(
                                        f"{self.name}: Protocol {protocol.__class__.__name__} read_packet requested disconnect"
                                    )
                                    return None
        Severity: Major
        Found in openc3/python/openc3/interfaces/simulated_target_interface.py - About 45 mins to fix

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

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

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

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

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

                Avoid deeply nested control flow statements.
                Open

                                        if packet == "STOP":
                                            break
                                    if packet == "STOP":
                Severity: Major
                Found in openc3/python/openc3/interfaces/simulated_target_interface.py - About 45 mins to fix

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

                      def error(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 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language