@@ -71,6 +71,9 @@ from typing import ( # noqa: Y022,Y037,Y038,Y039,UP035
7171 type_check_only ,
7272)
7373
74+ if sys .version_info >= (3 , 14 ):
75+ from _typeshed import EvaluateFunc
76+
7477# Please keep order the same as at runtime.
7578__all__ = [
7679 # Super-special typing primitives.
@@ -458,7 +461,6 @@ if sys.version_info >= (3, 13):
458461 ReadOnly as ReadOnly ,
459462 TypeIs as TypeIs ,
460463 TypeVar as TypeVar ,
461- TypeVarTuple as TypeVarTuple ,
462464 get_protocol_members as get_protocol_members ,
463465 is_protocol as is_protocol ,
464466 )
@@ -547,19 +549,58 @@ else:
547549 def has_default (self ) -> bool : ...
548550 def __typing_prepare_subst__ (self , alias : Any , args : Any ) -> tuple [Any , ...]: ...
549551
552+ ReadOnly : _SpecialForm
553+ TypeIs : _SpecialForm
554+
555+ if sys .version_info >= (3 , 15 ):
556+ from typing import TypeVarTuple as TypeVarTuple
557+ else :
550558 @final
551559 class TypeVarTuple :
552560 @property
553561 def __name__ (self ) -> str : ...
554562 @property
563+ def __bound__ (self ) -> AnnotationForm | None : ...
564+ @property
565+ def __covariant__ (self ) -> bool : ...
566+ @property
567+ def __contravariant__ (self ) -> bool : ...
568+ @property
569+ def __infer_variance__ (self ) -> bool : ...
570+ @property
555571 def __default__ (self ) -> AnnotationForm : ...
556- def __init__ (self , name : str , * , default : AnnotationForm = ...) -> None : ...
572+ if sys .version_info >= (3 , 11 ):
573+ def __new__ (
574+ cls ,
575+ name : str ,
576+ * ,
577+ bound : AnnotationForm | None = None ,
578+ covariant : bool = False ,
579+ contravariant : bool = False ,
580+ infer_variance : bool = False ,
581+ default : AnnotationForm = ...,
582+ ) -> Self : ...
583+ else :
584+ def __init__ (
585+ self ,
586+ name : str ,
587+ * ,
588+ bound : AnnotationForm | None = None ,
589+ covariant : bool = False ,
590+ contravariant : bool = False ,
591+ infer_variance : bool = False ,
592+ default : AnnotationForm = ...,
593+ ) -> None : ...
594+
557595 def __iter__ (self ) -> Any : ... # Unpack[Self]
558596 def has_default (self ) -> bool : ...
559- def __typing_prepare_subst__ (self , alias : Any , args : Any ) -> tuple [Any , ...]: ...
597+ if sys .version_info >= (3 , 11 ):
598+ def __typing_subst__ (self , arg : Never , / ) -> Never : ...
560599
561- ReadOnly : _SpecialForm
562- TypeIs : _SpecialForm
600+ def __typing_prepare_subst__ (self , alias : Any , args : Any , / ) -> tuple [Any , ...]: ...
601+ if sys .version_info >= (3 , 14 ):
602+ @property
603+ def evaluate_default (self ) -> EvaluateFunc | None : ...
563604
564605# TypeAliasType was added in Python 3.12, but had significant changes in 3.14.
565606if sys .version_info >= (3 , 14 ):
0 commit comments