11import collections # Needed by aliases like DefaultDict, see mypy issue 2986
22import sys
3- from _typeshed import IdentityFunction , ReadableBuffer , Self as TypeshedSelf , SupportsKeysAndGetItem
3+ from _typeshed import IdentityFunction , Incomplete , ReadableBuffer , Self as TypeshedSelf , SupportsKeysAndGetItem
44from abc import ABCMeta , abstractmethod
55from types import (
66 BuiltinFunctionType ,
@@ -138,6 +138,8 @@ class TypeVar:
138138 if sys .version_info >= (3 , 10 ):
139139 def __or__ (self , right : Any ) -> _SpecialForm : ...
140140 def __ror__ (self , left : Any ) -> _SpecialForm : ...
141+ if sys .version_info >= (3 , 11 ):
142+ def __typing_subst__ (self , arg : Incomplete ) -> Incomplete : ...
141143
142144# Used for an undocumented mypy feature. Does not exist at runtime.
143145_promote = object ()
@@ -192,6 +194,8 @@ if sys.version_info >= (3, 11):
192194 __name__ : str
193195 def __init__ (self , name : str ) -> None : ...
194196 def __iter__ (self ) -> Any : ...
197+ def __typing_subst__ (self , arg : Never ) -> Never : ...
198+ def __typing_prepare_subst__ (self , alias : Incomplete , args : Incomplete ) -> Incomplete : ...
195199
196200if sys .version_info >= (3 , 10 ):
197201 class ParamSpecArgs :
@@ -212,6 +216,10 @@ if sys.version_info >= (3, 10):
212216 def args (self ) -> ParamSpecArgs : ...
213217 @property
214218 def kwargs (self ) -> ParamSpecKwargs : ...
219+ if sys .version_info >= (3 , 11 ):
220+ def __typing_subst__ (self , arg : Incomplete ) -> Incomplete : ...
221+ def __typing_prepare_subst__ (self , alias : Incomplete , args : Incomplete ) -> Incomplete : ...
222+
215223 def __or__ (self , right : Any ) -> _SpecialForm : ...
216224 def __ror__ (self , left : Any ) -> _SpecialForm : ...
217225 Concatenate : _SpecialForm
0 commit comments