2 parents a9744d6 + f620a31 commit c4507e4Copy full SHA for c4507e4
1 file changed
src/frozendict/__init__.pyi
@@ -1,5 +1,7 @@
1
from __future__ import annotations
2
3
+import sys
4
+
5
from typing import (
6
TypeVar,
7
overload,
@@ -19,11 +21,15 @@ except ImportError:
19
21
Tuple = tuple
20
22
Type = type
23
24
+if sys.version_info >= (3, 11):
25
+ from typing import Self as SelfT
26
+else:
27
+ SelfT = TypeVar("SelfT", bound=frozendict[K, V])
28
29
K = TypeVar("K")
30
V = TypeVar("V", covariant=True)
31
K2 = TypeVar("K2")
32
V2 = TypeVar("V2", covariant=True)
-SelfT = TypeVar("SelfT", bound=frozendict[K, V])
33
34
# noinspection PyPep8Naming
35
class frozendict(Mapping[K, V]):
0 commit comments