diff --git a/docs/source/how_to_guides/extensible_nodes.rst b/docs/source/how_to_guides/extensible_nodes.rst index 043d0f06..4819cbb2 100644 --- a/docs/source/how_to_guides/extensible_nodes.rst +++ b/docs/source/how_to_guides/extensible_nodes.rst @@ -52,4 +52,4 @@ class Router(NetworkNode, identifier="router"): Changes to YAML file. ===================== -While effort has been made to ensure that nodes defined within configuration YAML files for use with PrimAITE 3.X remain compatible with PrimAITE v4+, it is encouraged to review for minor changes needed. +While effort has been made to ensure that nodes defined within configuration YAML files for use with PrimAITE 3.X remain compatible with PrimAITE v4+, it is encouraged to review for minor changes needed. diff --git a/src/primaite/game/agent/interface.py b/src/primaite/game/agent/interface.py index 571c850d..07363012 100644 --- a/src/primaite/game/agent/interface.py +++ b/src/primaite/game/agent/interface.py @@ -80,8 +80,7 @@ class AbstractAgent(BaseModel, ABC): _registry: ClassVar[Dict[str, Type[AbstractAgent]]] = {} def __init__(self, **kwargs): - """Initialise and setup agent logger""" - + """Initialise and setup agent logger.""" super().__init__(**kwargs) self.logger: AgentLog = AgentLog(agent_name=kwargs["config"]["ref"]) diff --git a/src/primaite/simulator/network/container.py b/src/primaite/simulator/network/container.py index 1fa8c680..b0426537 100644 --- a/src/primaite/simulator/network/container.py +++ b/src/primaite/simulator/network/container.py @@ -163,7 +163,6 @@ class Network(SimComponent): :param links: Include link details in the output. Defaults to True. :param markdown: Use Markdown style in table output. Defaults to False. """ - if nodes: table = PrettyTable(["Node", "Type", "Operating State"]) if markdown: @@ -192,8 +191,8 @@ class Network(SimComponent): port.ip_address, port.subnet_mask, node.config.default_gateway, - ] - ) + ] + ) print(table) if links: diff --git a/src/primaite/simulator/system/software.py b/src/primaite/simulator/system/software.py index 42468057..8fb64d73 100644 --- a/src/primaite/simulator/system/software.py +++ b/src/primaite/simulator/system/software.py @@ -20,7 +20,6 @@ from primaite.utils.validation.port import Port if TYPE_CHECKING: from primaite.simulator.system.core.software_manager import SoftwareManager - from primaite.simulator.network.hardware.base import Node class SoftwareType(Enum): diff --git a/tests/unit_tests/_primaite/_game/_agent/test_agent.py b/tests/unit_tests/_primaite/_game/_agent/test_agent.py index 064537c2..b555f1b2 100644 --- a/tests/unit_tests/_primaite/_game/_agent/test_agent.py +++ b/tests/unit_tests/_primaite/_game/_agent/test_agent.py @@ -4,7 +4,7 @@ from primaite.game.agent.scripted_agents.random_agent import RandomAgent def test_creating_empty_agent(): - agent = RandomAgent(config={"ref" :"Empty Agent"}) + agent = RandomAgent(config={"ref": "Empty Agent"}) assert len(agent.action_manager.action_map) == 0 assert isinstance(agent.observation_manager.obs, NullObservation) assert len(agent.reward_function.reward_components) == 0