diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-28 22:20:09 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 5f71fedd7213fb5873bafa9233cc28cca5690c31 (patch) | |
tree | b94a6b3698c51b4445df27324a9598d2d1319ad7 /slack | |
parent | 7ab59b24a43b1219aac5caba59188934bdf69e09 (diff) | |
download | wee-slack-5f71fedd7213fb5873bafa9233cc28cca5690c31.tar.gz |
Fix compatibility with Python 3.7
Diffstat (limited to 'slack')
-rw-r--r-- | slack/slack_conversation.py | 4 | ||||
-rw-r--r-- | slack/task.py | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/slack/slack_conversation.py b/slack/slack_conversation.py index d078ead..a23666e 100644 --- a/slack/slack_conversation.py +++ b/slack/slack_conversation.py @@ -2,7 +2,7 @@ from __future__ import annotations import time from contextlib import contextmanager -from typing import TYPE_CHECKING, List, Literal, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union import weechat @@ -12,6 +12,8 @@ from slack.task import gather from slack.util import get_callback_name if TYPE_CHECKING: + from typing_extensions import Literal + from slack.slack_api import SlackApi from slack.slack_workspace import SlackWorkspace diff --git a/slack/task.py b/slack/task.py index 5b3ebfd..d765811 100644 --- a/slack/task.py +++ b/slack/task.py @@ -2,13 +2,13 @@ from __future__ import annotations import traceback from typing import ( + TYPE_CHECKING, Any, Awaitable, Coroutine, Dict, Generator, List, - Literal, Optional, Sequence, Tuple, @@ -25,6 +25,9 @@ from slack.log import print_error from slack.shared import shared from slack.util import get_callback_name +if TYPE_CHECKING: + from typing_extensions import Literal + T = TypeVar("T") |