diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-12-29 17:05:21 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-12-29 17:06:29 +0100 |
commit | 95ca11e98c47c3e8e57093c37134a6f51bcb6f30 (patch) | |
tree | 4c10504aee30dab96e6d5836f0f35f9d6a6a9810 /swiftstory/cards.py | |
parent | 8d242a5e6c090ee8165b36fea6520d533269518e (diff) |
Add type hinting everywhere so we can enable strict mypy options
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'swiftstory/cards.py')
-rw-r--r-- | swiftstory/cards.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/swiftstory/cards.py b/swiftstory/cards.py index 62f1e37..96438cc 100644 --- a/swiftstory/cards.py +++ b/swiftstory/cards.py @@ -1,18 +1,19 @@ import json import os +from typing import List import pkg_resources class Cards: @staticmethod - def get_white_cards(lang): + def get_white_cards(lang: str) -> List[str]: ''' Read the file containing the white cards and return a list of cards ''' fh = pkg_resources.resource_stream(__name__, os.path.join("data/lang", lang, "cards/white.json")) return json.load(fh) @staticmethod - def get_black_cards(lang): + def get_black_cards(lang: str) -> List[str]: ''' Read the file containing the black cards and return a list of cards ''' fh = pkg_resources.resource_stream(__name__, os.path.join("data/lang", lang, "cards/black.json")) return json.load(fh) |