#2913: Pre-commit fix
This commit is contained in:
@@ -11,10 +11,13 @@ Changes to reward class structure.
|
|||||||
==================================
|
==================================
|
||||||
|
|
||||||
Reward classes are inherited from AbstractReward (a sub-class of Pydantic's BaseModel).
|
Reward classes are inherited from AbstractReward (a sub-class of Pydantic's BaseModel).
|
||||||
Within the reward class is a ConfigSchema class responsible for ensuring config file data is in the
|
Within the reward class there is a ConfigSchema class responsible for ensuring config file data is
|
||||||
correct format. The `.from_config()` method is generally unchanged.
|
in the correct format. The `.from_config()` method is generally unchanged but should initialise the
|
||||||
|
attributes edfined in the ConfigSchema.
|
||||||
|
Each class requires an identifier string which is used by the ConfigSchema class to verify that it
|
||||||
|
hasn't previously been added to the registry.
|
||||||
|
|
||||||
Inheriting from `BaseModel` removes the need for an `__init__` method bu means that object
|
Inheriting from `BaseModel` removes the need for an `__init__` method but means that object
|
||||||
attributes need to be passed by keyword.
|
attributes need to be passed by keyword.
|
||||||
|
|
||||||
.. code:: Python
|
.. code:: Python
|
||||||
@@ -69,4 +72,4 @@ Changes to YAML file.
|
|||||||
.. code:: YAML
|
.. code:: YAML
|
||||||
|
|
||||||
There's no longer a need to provide a `dns_server` as an option in the simulation section
|
There's no longer a need to provide a `dns_server` as an option in the simulation section
|
||||||
of the config file.
|
of the config file.
|
||||||
|
|||||||
Reference in New Issue
Block a user