You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: basedtyping/__init__.py
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@
9
9
ForwardRef,
10
10
Generic,
11
11
NoReturn,
12
+
Self,
12
13
Sequence,
13
14
Tuple,
14
15
Type,
@@ -108,7 +109,7 @@ class NotEnoughTypeParametersError(ReifiedGenericError):
108
109
"""
109
110
110
111
111
-
class_ReifiedGenericMetaclass(type):
112
+
class_ReifiedGenericMetaclass(type, Generic[T]):
112
113
# these should really only be on the class not the metaclass, but since it needs to be accessible from both instances and the class itself, its duplicated here
113
114
114
115
__reified_generics__: Tuple[type, ...]
@@ -124,9 +125,8 @@ class _ReifiedGenericMetaclass(type):
"""Used internally for ``isinstance`` and ``issubclass`` checks, ``True`` when the class can currenty be used in said checks without generics in them"""
126
127
127
-
def_orig_class(cls) ->_ReifiedGenericMetaclass:
128
-
"""Gets the original class that ``ReifiedGeneric.__class_getitem__`` copied from
0 commit comments