diff options
author | 2021-05-09 22:20:04 +0100 | |
---|---|---|
committer | 2021-05-09 22:20:04 +0100 | |
commit | 8c731f6cf2362d7ee89492e57236c803bd700a55 (patch) | |
tree | ac671f7cfd576c94ac9fa0ac60c8084f0cc45014 | |
parent | Revert changes to int e (diff) |
Type hint the Metabase cog!
Co-authored-by: Xithrius <[email protected]>
-rw-r--r-- | bot/exts/moderation/metabase.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/exts/moderation/metabase.py b/bot/exts/moderation/metabase.py index 6f05a320b..e1531c467 100644 --- a/bot/exts/moderation/metabase.py +++ b/bot/exts/moderation/metabase.py @@ -3,6 +3,7 @@ import json import logging from datetime import timedelta from io import StringIO +from typing import Dict, List, Optional import arrow from aiohttp.client_exceptions import ClientResponseError @@ -33,11 +34,11 @@ class Metabase(Cog): self.bot = bot self._session_scheduler = Scheduler(self.__class__.__name__) - self.session_token = None # session_info["session_token"]: str - self.session_expiry = None # session_info["session_expiry"]: UtcPosixTimestamp + self.session_token: Optional[str] = None # session_info["session_token"]: str + self.session_expiry: Optional[float] = None # session_info["session_expiry"]: UtcPosixTimestamp self.headers = BASE_HEADERS - self.exports = {} # Saves the output of each question, so internal eval can access it + self.exports: Dict[int, List[Dict]] = {} # Saves the output of each question, so internal eval can access it self.init_task = self.bot.loop.create_task(self.init_cog()) |