From 741f8234edde84dccefcbf5dc0ba3b70c0e016e2 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Wed, 29 Dec 2021 19:21:45 +0100 Subject: Add docstrings to all modules Signed-off-by: Olivier Gayot --- swiftstory/game_manager.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'swiftstory/game_manager.py') diff --git a/swiftstory/game_manager.py b/swiftstory/game_manager.py index 56279a6..aa951f5 100644 --- a/swiftstory/game_manager.py +++ b/swiftstory/game_manager.py @@ -1,3 +1,6 @@ +""" Module defining a class to store the games/rooms in the different +languages. """ + from dataclasses import dataclass import logging from typing import Dict, List @@ -10,7 +13,7 @@ from swiftstory.cards import Cards class NoSuchGameError(Exception): - """ Exception to be raised when no game is found matching the criterias. + """ Exception to be raised when no game is found matching the criterion. """ def __init__(self, message: str = "", game_name: str = "", lang: str = "") -> None: self.game_name = game_name @@ -20,14 +23,14 @@ class NoSuchGameError(Exception): @dataclass class LangContainer: - """ Container for game ojects in a given language. """ + """ Container for game objects in a given language. """ black_cards: List[str] white_cards: List[str] games: Dict[str, Game] class GameManager: - + """ Store the different rooms/games of the different languages. """ def __init__(self) -> None: self.lang_containers: Dict[str, LangContainer] = {} -- cgit v1.2.3