aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2022-09-18 20:41:47 +0200
committerGravatar Numerlor <[email protected]>2022-09-18 20:41:47 +0200
commited9890abd8c07d6f414e273139e8715f3917b7fc (patch)
treeb430ed390c9dd16535d02f2621d2160de4a0a3d1
parentMerge remote-tracking branch 'upstream/main' into no-duplicate-deco (diff)
use paramspec from typing
the package now requires python 3.10
-rw-r--r--botcore/utils/cooldown.py9
-rw-r--r--botcore/utils/function.py3
2 files changed, 4 insertions, 8 deletions
diff --git a/botcore/utils/cooldown.py b/botcore/utils/cooldown.py
index ee65033d..5fb974e2 100644
--- a/botcore/utils/cooldown.py
+++ b/botcore/utils/cooldown.py
@@ -25,14 +25,11 @@ _ArgsList = list[object]
_HashableArgsTuple = tuple[Hashable, ...]
if typing.TYPE_CHECKING:
- from botcore import BotBase
import typing_extensions
- P = typing_extensions.ParamSpec("P")
- P.__constraints__ = ()
-else:
- P = typing.TypeVar("P")
- """The command's signature."""
+ from botcore import BotBase
+P = typing.ParamSpec("P")
+"""The command's signature."""
R = typing.TypeVar("R")
"""The command's return value."""
diff --git a/botcore/utils/function.py b/botcore/utils/function.py
index 0e90d4c5..d89163ec 100644
--- a/botcore/utils/function.py
+++ b/botcore/utils/function.py
@@ -11,8 +11,7 @@ __all__ = ["command_wraps", "GlobalNameConflictError", "update_wrapper_globals"]
if typing.TYPE_CHECKING:
- import typing_extensions
- _P = typing_extensions.ParamSpec("_P")
+ _P = typing.ParamSpec("_P")
_R = typing.TypeVar("_R")