import json import os from typing import List import pkg_resources class Cards: @staticmethod 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: 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)