@@ -136,14 +136,32 @@ Any = object()
136136
137137@_final
138138class TypeVar :
139- __name__ : str
140- __bound__ : Any | None
141- __constraints__ : tuple [Any , ...]
142- __covariant__ : bool
143- __contravariant__ : bool
144- def __init__ (
145- self , name : str , * constraints : Any , bound : Any | None = None , covariant : bool = False , contravariant : bool = False
146- ) -> None : ...
139+ @property
140+ def __name__ (self ) -> str : ...
141+ @property
142+ def __bound__ (self ) -> Any | None : ...
143+ @property
144+ def __constraints__ (self ) -> tuple [Any , ...]: ...
145+ @property
146+ def __covariant__ (self ) -> bool : ...
147+ @property
148+ def __contravariant__ (self ) -> bool : ...
149+ if sys .version_info >= (3 , 12 ):
150+ @property
151+ def __infer_variance__ (self ) -> bool : ...
152+ def __init__ (
153+ self ,
154+ name : str ,
155+ * constraints : Any ,
156+ bound : Any | None = None ,
157+ covariant : bool = False ,
158+ contravariant : bool = False ,
159+ infer_variance : bool = False ,
160+ ) -> None : ...
161+ else :
162+ def __init__ (
163+ self , name : str , * constraints : Any , bound : Any | None = None , covariant : bool = False , contravariant : bool = False
164+ ) -> None : ...
147165 if sys .version_info >= (3 , 10 ):
148166 def __or__ (self , right : Any ) -> _SpecialForm : ...
149167 def __ror__ (self , left : Any ) -> _SpecialForm : ...
@@ -194,29 +212,50 @@ if sys.version_info >= (3, 11):
194212 LiteralString : _SpecialForm
195213
196214 class TypeVarTuple :
197- __name__ : str
215+ @property
216+ def __name__ (self ) -> str : ...
198217 def __init__ (self , name : str ) -> None : ...
199218 def __iter__ (self ) -> Any : ...
200219 def __typing_subst__ (self , arg : Never ) -> Never : ...
201220 def __typing_prepare_subst__ (self , alias : Incomplete , args : Incomplete ) -> Incomplete : ...
202221
203222if sys .version_info >= (3 , 10 ):
204223 class ParamSpecArgs :
205- __origin__ : ParamSpec
224+ @property
225+ def __origin__ (self ) -> ParamSpec : ...
206226 def __init__ (self , origin : ParamSpec ) -> None : ...
207227
208228 class ParamSpecKwargs :
209- __origin__ : ParamSpec
229+ @property
230+ def __origin__ (self ) -> ParamSpec : ...
210231 def __init__ (self , origin : ParamSpec ) -> None : ...
211232
212233 class ParamSpec :
213- __name__ : str
214- __bound__ : Any | None
215- __covariant__ : bool
216- __contravariant__ : bool
217- def __init__ (
218- self , name : str , * , bound : Any | None = None , contravariant : bool = False , covariant : bool = False
219- ) -> None : ...
234+ @property
235+ def __name__ (self ) -> str : ...
236+ @property
237+ def __bound__ (self ) -> Any | None : ...
238+ @property
239+ def __covariant__ (self ) -> bool : ...
240+ @property
241+ def __contravariant__ (self ) -> bool : ...
242+ if sys .version_info >= (3 , 12 ):
243+ @property
244+ def __infer_variance__ (self ) -> bool : ...
245+ def __init__ (
246+ self ,
247+ name : str ,
248+ * ,
249+ bound : Any | None = None ,
250+ contravariant : bool = False ,
251+ covariant : bool = False ,
252+ infer_variance : bool = False ,
253+ ) -> None : ...
254+ else :
255+ def __init__ (
256+ self , name : str , * , bound : Any | None = None , contravariant : bool = False , covariant : bool = False
257+ ) -> None : ...
258+
220259 @property
221260 def args (self ) -> ParamSpecArgs : ...
222261 @property
@@ -873,3 +912,26 @@ if sys.version_info >= (3, 10):
873912 def is_typeddict (tp : object ) -> bool : ...
874913
875914def _type_repr (obj : object ) -> str : ...
915+
916+ if sys .version_info >= (3 , 12 ):
917+ def override (__arg : _F ) -> _F : ...
918+ @_final
919+ class TypeAliasType :
920+ def __init__ (
921+ self , name : str , value : Any , * , type_params : tuple [TypeVar | ParamSpec | TypeVarTuple , ...] = ()
922+ ) -> None : ...
923+ @property
924+ def __value__ (self ) -> Any : ...
925+ @property
926+ def __type_params__ (self ) -> tuple [TypeVar | ParamSpec | TypeVarTuple , ...]: ...
927+ @property
928+ def __parameters__ (self ) -> tuple [Any , ...]: ...
929+ @property
930+ def __name__ (self ) -> str : ...
931+ # It's writable on types, but not on instances of TypeAliasType.
932+ @property
933+ def __module__ (self ) -> str | None : ... # type: ignore[override]
934+ def __getitem__ (self , parameters : Any ) -> Any : ...
935+ if sys .version_info >= (3 , 10 ):
936+ def __or__ (self , right : Any ) -> _SpecialForm : ...
937+ def __ror__ (self , left : Any ) -> _SpecialForm : ...
0 commit comments