diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index bf1e6cde2c08..ab8b362ab47c 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -261,10 +261,10 @@ class int: @overload def __pow__(self, __x: _NegativeInteger, __modulo: None = ...) -> float: ... # positive x -> int; negative x -> float - # return type must be Any as `int | float` causes too many false-positive errors + # return type is `int | float | Any` as `int | float` causes too many false-positive errors @overload - def __pow__(self, __x: int, __modulo: None = ...) -> Any: ... - def __rpow__(self, __x: int, __mod: int | None = ...) -> Any: ... + def __pow__(self, __x: int, __modulo: None = ...) -> int | float | Any: ... + def __rpow__(self, __x: int, __mod: int | None = ...) -> int | float | Any: ... def __and__(self, __n: int) -> int: ... def __or__(self, __n: int) -> int: ... def __xor__(self, __n: int) -> int: ... @@ -318,9 +318,9 @@ class float: @overload def __pow__(self, __x: int, __mod: None = ...) -> float: ... # positive x -> float; negative x -> complex - # return type must be Any as `float | complex` causes too many false-positive errors + # return type is `float | complex | Any` as `float | complex` causes too many false-positive errors @overload - def __pow__(self, __x: float, __mod: None = ...) -> Any: ... + def __pow__(self, __x: float, __mod: None = ...) -> float | complex | Any: ... def __radd__(self, __x: float) -> float: ... def __rsub__(self, __x: float) -> float: ... def __rmul__(self, __x: float) -> float: ... @@ -329,7 +329,7 @@ class float: def __rmod__(self, __x: float) -> float: ... def __rdivmod__(self, __x: float) -> tuple[float, float]: ... # Returns complex if the argument is negative. - def __rpow__(self, __x: float, __mod: None = ...) -> Any: ... + def __rpow__(self, __x: float, __mod: None = ...) -> float | complex | Any: ... def __getnewargs__(self) -> tuple[float]: ... def __trunc__(self) -> int: ... if sys.version_info >= (3, 9):