File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
@tests/stubtest_allowlists Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -466,7 +466,6 @@ typing._Final.__init_subclass__
466466typing\.Protocol
467467typing(_extensions)?\._TypedDict
468468typing(_extensions)?\.Any.*
469- typing(_extensions)?\.Generic
470469typing(_extensions)?\.TypedDict
471470typing_extensions\.ParamSpec.*
472471typing_extensions\.TypeVar.*
Original file line number Diff line number Diff line change @@ -235,7 +235,6 @@ class _SpecialForm(_Final):
235235 def __ror__ (self , other : Any ) -> _SpecialForm : ...
236236
237237Union : _SpecialForm
238- Generic : _SpecialForm
239238Protocol : _SpecialForm
240239Callable : _SpecialForm
241240Type : _SpecialForm
@@ -440,6 +439,20 @@ Annotated: _SpecialForm
440439# Predefined type variables.
441440AnyStr = TypeVar ("AnyStr" , str , bytes ) # noqa: Y001
442441
442+ @type_check_only
443+ class _Generic :
444+ if sys .version_info < (3 , 12 ):
445+ __slots__ = ()
446+
447+ if sys .version_info >= (3 , 10 ):
448+ @classmethod
449+ def __class_getitem__ (cls , args : TypeVar | ParamSpec | tuple [TypeVar | ParamSpec , ...]) -> _Final : ...
450+ else :
451+ @classmethod
452+ def __class_getitem__ (cls , args : TypeVar | tuple [TypeVar , ...]) -> _Final : ...
453+
454+ Generic : type [_Generic ]
455+
443456class _ProtocolMeta (ABCMeta ):
444457 if sys .version_info >= (3 , 12 ):
445458 def __init__ (cls , * args : Any , ** kwargs : Any ) -> None : ...
You can’t perform that action at this time.
0 commit comments