@@ -16,7 +16,7 @@ from collections.abc import (
1616 ValuesView ,
1717)
1818from importlib .machinery import ModuleSpec
19- from typing import Any , ClassVar , Literal , TypeVar , final , overload
19+ from typing import Any , ClassVar , Literal , TypeVar , _SpecialForm , final , overload
2020from typing_extensions import ParamSpec , Self , TypeAliasType , TypeVarTuple , deprecated , disjoint_base
2121
2222if sys .version_info >= (3 , 14 ):
@@ -717,10 +717,12 @@ if sys.version_info >= (3, 10):
717717 def __args__ (self ) -> tuple [Any , ...]: ...
718718 @property
719719 def __parameters__ (self ) -> tuple [Any , ...]: ...
720- def __or__ (self , value : Any , / ) -> UnionType : ...
721- def __ror__ (self , value : Any , / ) -> UnionType : ...
720+ # the `Any` is because of underspecified binop semantics, when the rhs is a `_SpecialForm` it might result in a `_SpecialForm` (Union)
721+ def __or__ (self , value : Any , / ) -> UnionType | type | Any : ...
722+ def __ror__ (self , value : Any , / ) -> UnionType | type | Any : ...
722723 def __eq__ (self , value : object , / ) -> bool : ...
723724 def __hash__ (self ) -> int : ...
725+ def __getitem__ (self , parameters : Any ) -> object : ...
724726
725727if sys .version_info >= (3 , 13 ):
726728 @final
0 commit comments