Skip to content

Commit

Permalink
fixed pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kulovac committed Jul 10, 2024
1 parent f08d573 commit 40a4d46
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 4 additions & 5 deletions ADCS/adcs_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

SLEEP_TIME = 5 # in seconds
EXIT_FLAG = b"EXIT"
DEFAULT_HOST = "127.0.0.1"
DEFAULT_PORT = 42123


def command_line_handler(argv) -> tuple[int, str]:
Expand All @@ -24,11 +26,8 @@ def command_line_handler(argv) -> tuple[int, str]:
(PORT, HOST)
"""

default_host = "127.0.0.1"
default_port = 42123

ret_port = int(argv[1]) if len(argv) > 1 else default_port
ret_host = argv[2] if len(argv) > 2 else default_host
ret_port = int(argv[1]) if len(argv) > 1 else DEFAULT_PORT
ret_host = argv[2] if len(argv) > 2 else DEFAULT_HOST

return ret_port, ret_host

Expand Down
4 changes: 4 additions & 0 deletions ADCS/adcs_states.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Stores the enum states of the ADCS
"""

from enum import Enum
from enum import auto

Expand Down
7 changes: 4 additions & 3 deletions ADCS/adcs_subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@

# Custom import
from abstract_interface import ConnectionProtocol
from adcs_components import AngularMeasurement, AngularSpeed, MagneticMeasurements, WheelSpeed, SystemClock, MagneticCurrent
from adcs_components import AngularMeasurement, AngularSpeed, \
MagneticMeasurements, WheelSpeed, SystemClock, MagneticCurrent
from adcs_states import ADCSState


class ADCSSubsystem:
class ADCSSubsystem: # pylint: disable=too-many-instance-attributes
"""
This class represents the simulated ADCS subsystem.
"""
Expand Down Expand Up @@ -54,7 +55,7 @@ def __init__(self, connection_protocol: ConnectionProtocol):
}

def __repr__(self):
return f"ADCSSubsystem(\n" + f"{self.__dict__!r}" f"\n)"
return "ADCSSubsystem(\n" + f"{self.__dict__!r}" f"\n)"

def init_link(self):
"""This method should initiate the protocol connection between the OBC and the ADCS"""
Expand Down

0 comments on commit 40a4d46

Please sign in to comment.