@@ -53,7 +53,18 @@ from typing import ( # noqa: Y022
5353 overload ,
5454 type_check_only ,
5555)
56- from typing_extensions import Concatenate , Literal , LiteralString , ParamSpec , Self , SupportsIndex , TypeAlias , TypeGuard , final
56+ from typing_extensions import (
57+ Concatenate ,
58+ Literal ,
59+ LiteralString ,
60+ ParamSpec ,
61+ Self ,
62+ SupportsIndex ,
63+ TypeAlias ,
64+ TypeGuard ,
65+ TypeVarTuple ,
66+ final ,
67+ )
5768
5869if sys .version_info >= (3 , 9 ):
5970 from types import GenericAlias
@@ -187,6 +198,8 @@ class type:
187198 if sys .version_info >= (3 , 10 ):
188199 def __or__ (self , __value : Any ) -> types .UnionType : ...
189200 def __ror__ (self , __value : Any ) -> types .UnionType : ...
201+ if sys .version_info >= (3 , 12 ):
202+ __type_params__ : tuple [TypeVar | ParamSpec | TypeVarTuple , ...]
190203
191204class super :
192205 @overload
@@ -244,6 +257,9 @@ class int:
244257 signed : bool = False ,
245258 ) -> Self : ...
246259
260+ if sys .version_info >= (3 , 12 ):
261+ def is_integer (self ) -> Literal [True ]: ...
262+
247263 def __add__ (self , __value : int ) -> int : ...
248264 def __sub__ (self , __value : int ) -> int : ...
249265 def __mul__ (self , __value : int ) -> int : ...
@@ -966,6 +982,8 @@ class function:
966982 if sys .version_info >= (3 , 10 ):
967983 @property
968984 def __builtins__ (self ) -> dict [str , Any ]: ...
985+ if sys .version_info >= (3 , 12 ):
986+ __type_params__ : tuple [TypeVar | ParamSpec | TypeVarTuple , ...]
969987
970988 __module__ : str
971989 # mypy uses `builtins.function.__get__` to represent methods, properties, and getset_descriptors so we type the return as Any.
@@ -1918,6 +1936,8 @@ class ImportError(Exception):
19181936 name : str | None
19191937 path : str | None
19201938 msg : str # undocumented
1939+ if sys .version_info >= (3 , 12 ):
1940+ name_from : str | None # undocumented
19211941
19221942class LookupError (Exception ): ...
19231943class MemoryError (Exception ): ...
0 commit comments