diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 568c8931f04a..f7fc2575c164 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -250,10 +250,6 @@ class int: def __rmod__(self, __x: int) -> int: ... def __rdivmod__(self, __x: int) -> tuple[int, int]: ... @overload - def __pow__(self, __x: int, __modulo: Literal[0]) -> NoReturn: ... - @overload - def __pow__(self, __x: int, __modulo: int) -> int: ... - @overload def __pow__(self, __x: Literal[0]) -> Literal[1]: ... @overload def __pow__(self, __x: Literal[0], __modulo: None) -> Literal[1]: ... @@ -265,6 +261,10 @@ class int: # return type must be Any as `int | float` causes too many false-positive errors @overload def __pow__(self, __x: int, __modulo: None = ...) -> Any: ... + @overload + def __pow__(self, __x: int, __modulo: Literal[0]) -> NoReturn: ... + @overload + def __pow__(self, __x: int, __modulo: int) -> int: ... def __rpow__(self, __x: int, __mod: int | None = ...) -> Any: ... def __and__(self, __n: int) -> int: ... def __or__(self, __n: int) -> int: ...