File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -717,10 +717,13 @@ 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`
721+ # it might result in a `_SpecialForm` (Union)
722+ def __or__ (self , value : Any , / ) -> UnionType | type | Any : ...
723+ def __ror__ (self , value : Any , / ) -> UnionType | type | Any : ...
722724 def __eq__ (self , value : object , / ) -> bool : ...
723725 def __hash__ (self ) -> int : ...
726+ def __getitem__ (self , parameters : Any ) -> object : ...
724727
725728if sys .version_info >= (3 , 13 ):
726729 @final
You can’t perform that action at this time.
0 commit comments