# Pre-commit actions
This commit is contained in:
@@ -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"])
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user