File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,6 @@ class _SpecialForm(_Final):
235
235
def __ror__ (self , other : Any ) -> _SpecialForm : ...
236
236
237
237
Union : _SpecialForm
238
- Generic : _SpecialForm
239
238
Protocol : _SpecialForm
240
239
Callable : _SpecialForm
241
240
Type : _SpecialForm
@@ -440,6 +439,14 @@ Annotated: _SpecialForm
440
439
# Predefined type variables.
441
440
AnyStr = TypeVar ("AnyStr" , str , bytes ) # noqa: Y001
442
441
442
+ if sys .version_info >= (3 , 12 ):
443
+ class Generic :
444
+ @classmethod
445
+ def __class_getitem__ (cls , args : TypeVar | ParamSpec | tuple [TypeVar | ParamSpec , ...]) -> _Final : ...
446
+ else :
447
+ # Dummy case; true definition accessible in typing
448
+ Generic : _SpecialForm
449
+
443
450
class _ProtocolMeta (ABCMeta ):
444
451
if sys .version_info >= (3 , 12 ):
445
452
def __init__ (cls , * args : Any , ** kwargs : Any ) -> None : ...
You can’t perform that action at this time.
0 commit comments