diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index 1fdb7c66b..3f6e671f2 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -179,7 +179,7 @@ class int: def __rmod__(self, x: int) -> int: ... def __rdivmod__(self, x: int) -> Tuple[int, int]: ... def __pow__(self, __x: int, __modulo: Optional[int] = ...) -> Any: ... # Return type can be int or float, depending on x. - def __rpow__(self, x: int) -> Any: ... + def __rpow__(self, x: int, mod: Optional[int] = ...) -> Any: ... def __and__(self, n: int) -> int: ... def __or__(self, n: int) -> int: ... def __xor__(self, n: int) -> int: ... @@ -241,7 +241,7 @@ class float: def __truediv__(self, x: float) -> float: ... def __mod__(self, x: float) -> float: ... def __divmod__(self, x: float) -> Tuple[float, float]: ... - def __pow__(self, x: float) -> float: ... # In Python 3, returns complex if self is negative and x is not whole + def __pow__(self, x: float, mod: None = ...) -> float: ... # In Python 3, returns complex if self is negative and x is not whole def __radd__(self, x: float) -> float: ... def __rsub__(self, x: float) -> float: ... def __rmul__(self, x: float) -> float: ... @@ -251,7 +251,7 @@ class float: def __rtruediv__(self, x: float) -> float: ... def __rmod__(self, x: float) -> float: ... def __rdivmod__(self, x: float) -> Tuple[float, float]: ... - def __rpow__(self, x: float) -> float: ... + def __rpow__(self, x: float, mod: None = ...) -> float: ... def __getnewargs__(self) -> Tuple[float]: ... def __trunc__(self) -> int: ... if sys.version_info >= (3,): @@ -295,14 +295,14 @@ class complex: def __add__(self, x: complex) -> complex: ... def __sub__(self, x: complex) -> complex: ... def __mul__(self, x: complex) -> complex: ... - def __pow__(self, x: complex) -> complex: ... + def __pow__(self, x: complex, mod: None = ...) -> complex: ... if sys.version_info < (3,): def __div__(self, x: complex) -> complex: ... def __truediv__(self, x: complex) -> complex: ... def __radd__(self, x: complex) -> complex: ... def __rsub__(self, x: complex) -> complex: ... def __rmul__(self, x: complex) -> complex: ... - def __rpow__(self, x: complex) -> complex: ... + def __rpow__(self, x: complex, mod: None = ...) -> complex: ... if sys.version_info < (3,): def __rdiv__(self, x: complex) -> complex: ... def __rtruediv__(self, x: complex) -> complex: ... diff --git a/stdlib/2and3/builtins.pyi b/stdlib/2and3/builtins.pyi index 1fdb7c66b..3f6e671f2 100644 --- a/stdlib/2and3/builtins.pyi +++ b/stdlib/2and3/builtins.pyi @@ -179,7 +179,7 @@ class int: def __rmod__(self, x: int) -> int: ... def __rdivmod__(self, x: int) -> Tuple[int, int]: ... def __pow__(self, __x: int, __modulo: Optional[int] = ...) -> Any: ... # Return type can be int or float, depending on x. - def __rpow__(self, x: int) -> Any: ... + def __rpow__(self, x: int, mod: Optional[int] = ...) -> Any: ... def __and__(self, n: int) -> int: ... def __or__(self, n: int) -> int: ... def __xor__(self, n: int) -> int: ... @@ -241,7 +241,7 @@ class float: def __truediv__(self, x: float) -> float: ... def __mod__(self, x: float) -> float: ... def __divmod__(self, x: float) -> Tuple[float, float]: ... - def __pow__(self, x: float) -> float: ... # In Python 3, returns complex if self is negative and x is not whole + def __pow__(self, x: float, mod: None = ...) -> float: ... # In Python 3, returns complex if self is negative and x is not whole def __radd__(self, x: float) -> float: ... def __rsub__(self, x: float) -> float: ... def __rmul__(self, x: float) -> float: ... @@ -251,7 +251,7 @@ class float: def __rtruediv__(self, x: float) -> float: ... def __rmod__(self, x: float) -> float: ... def __rdivmod__(self, x: float) -> Tuple[float, float]: ... - def __rpow__(self, x: float) -> float: ... + def __rpow__(self, x: float, mod: None = ...) -> float: ... def __getnewargs__(self) -> Tuple[float]: ... def __trunc__(self) -> int: ... if sys.version_info >= (3,): @@ -295,14 +295,14 @@ class complex: def __add__(self, x: complex) -> complex: ... def __sub__(self, x: complex) -> complex: ... def __mul__(self, x: complex) -> complex: ... - def __pow__(self, x: complex) -> complex: ... + def __pow__(self, x: complex, mod: None = ...) -> complex: ... if sys.version_info < (3,): def __div__(self, x: complex) -> complex: ... def __truediv__(self, x: complex) -> complex: ... def __radd__(self, x: complex) -> complex: ... def __rsub__(self, x: complex) -> complex: ... def __rmul__(self, x: complex) -> complex: ... - def __rpow__(self, x: complex) -> complex: ... + def __rpow__(self, x: complex, mod: None = ...) -> complex: ... if sys.version_info < (3,): def __rdiv__(self, x: complex) -> complex: ... def __rtruediv__(self, x: complex) -> complex: ... diff --git a/tests/stubtest_whitelists/py3_common.txt b/tests/stubtest_whitelists/py3_common.txt index b0283c48b..0af6f0c36 100644 --- a/tests/stubtest_whitelists/py3_common.txt +++ b/tests/stubtest_whitelists/py3_common.txt @@ -97,17 +97,12 @@ builtins.bytes.__int__ builtins.bytes.maketrans builtins.classmethod.__get__ builtins.complex.__complex__ -builtins.complex.__pow__ -builtins.complex.__rpow__ builtins.copyright builtins.credits builtins.ellipsis builtins.exit -builtins.float.__pow__ -builtins.float.__rpow__ builtins.function builtins.help -builtins.int.__rpow__ builtins.license builtins.memoryview.__contains__ builtins.memoryview.__iter__