diff --git a/tlapbot/redeems.py b/tlapbot/redeems.py index 32a13dc..6d8be35 100644 --- a/tlapbot/redeems.py +++ b/tlapbot/redeems.py @@ -214,7 +214,7 @@ def is_redeem_active(redeem_name: str) -> bool | None: -def is_redeem_from_config_active(redeem: Redeem, active_categories: list[str]) -> bool: +def is_redeem_from_config_active(redeem: tuple[str, Redeem], active_categories: list[str]) -> bool: """Checks if redeem is active. `redeem` is a whole key:value pair from redeems config.""" if isinstance(redeem[1].get("category"), list): for category in redeem[1]["category"]: diff --git a/tlapbot/tlapbot_types.py b/tlapbot/tlapbot_types.py index f79db4b..a972e9e 100644 --- a/tlapbot/tlapbot_types.py +++ b/tlapbot/tlapbot_types.py @@ -1,4 +1,5 @@ -from typing import Tuple, Any, TypeAlias +from typing import Any, TypeAlias -Redeem: TypeAlias = Tuple[str, dict[str, Any]] -Redeems: TypeAlias = Tuple[str, Redeem] \ No newline at end of file +Redeem: TypeAlias = dict[str, dict[str, Any]] +# at the moment the Any could be specialized to str | int | list[str] +Redeems: TypeAlias = dict[str, Redeem] \ No newline at end of file