Added docstrings to class intialisers

This commit is contained in:
Marek Wolan
2023-07-06 16:08:51 +01:00
parent 9167816896
commit 653d76ec62
23 changed files with 253 additions and 137 deletions

View File

@@ -7,15 +7,7 @@ from primaite.config.training_config import TrainingConfig
class Node:
"""Node class.
:param node_id: The node id.
:param name: The name of the node.
:param node_type: The type of the node.
:param priority: The priority of the node.
:param hardware_state: The state of the node.
:param config_values: Config values.
"""
"""Node class."""
def __init__(
self,
@@ -26,6 +18,16 @@ class Node:
hardware_state: HardwareState,
config_values: TrainingConfig,
):
"""
Initialise a node.
:param node_id: The node id.
:param name: The name of the node.
:param node_type: The type of the node.
:param priority: The priority of the node.
:param hardware_state: The state of the node.
:param config_values: Config values.
"""
self.node_id: Final[str] = node_id
self.name: Final[str] = name
self.node_type: Final[NodeType] = node_type