Format docstrings

This commit is contained in:
Marek Wolan
2023-07-04 11:11:52 +01:00
parent 91273b2f99
commit 9244c160b1
39 changed files with 208 additions and 409 deletions

View File

@@ -10,8 +10,7 @@ _LOGGER = getLogger(__name__)
def get_file_path(path: str) -> Path:
"""
Get PrimAITE package data.
"""Get PrimAITE package data.
:Example:

View File

@@ -7,11 +7,9 @@ import polars as pl
def av_rewards_dict(av_rewards_csv_file: Union[str, Path]) -> Dict[int, float]:
"""
Read an average rewards per episode csv file and return as a dict.
"""Read an average rewards per episode csv file and return as a dict.
The dictionary keys are the episode number, and the values are the mean
reward that episode.
The dictionary keys are the episode number, and the values are the mean reward that episode.
:param av_rewards_csv_file: The average rewards per episode csv file path.
:return: The average rewards per episode cdv as a dict.

View File

@@ -12,8 +12,7 @@ _LOGGER: Logger = getLogger(__name__)
class SessionOutputWriter:
"""
A session output writer class.
"""A session output writer class.
Is used to write session outputs to csv file.
"""
@@ -65,11 +64,9 @@ class SessionOutputWriter:
_LOGGER.debug(f"Finished writing file: {self._csv_file_path}")
def write(self, data: Union[Tuple, Transaction]):
"""
Write a row of session data.
"""Write a row of session data.
:param data: The row of data to write. Can be a Tuple or an instance
of Transaction.
:param data: The row of data to write. Can be a Tuple or an instance of Transaction.
"""
if isinstance(data, Transaction):
header, data = data.as_csv_data()