builtins.pow: Add default values to <py38 branches; remove incorrect = ...s for the 13th overload (#9610)

This commit is contained in:
Alex Waygood
2023-01-30 17:12:50 +00:00
committed by GitHub
parent b748a9a543
commit 9099403d58

View File

@@ -1633,7 +1633,7 @@ if sys.version_info >= (3, 8):
@overload
def pow(base: _SupportsPow3NoneOnly[_E, _T_co], exp: _E, mod: None = None) -> _T_co: ...
@overload
def pow(base: _SupportsPow3[_E, _M, _T_co], exp: _E, mod: _M = ...) -> _T_co: ...
def pow(base: _SupportsPow3[_E, _M, _T_co], exp: _E, mod: _M) -> _T_co: ...
@overload
def pow(base: _SupportsSomeKindOfPow, exp: float, mod: None = None) -> Any: ...
@overload
@@ -1643,33 +1643,33 @@ else:
@overload
def pow(__base: int, __exp: int, __mod: int) -> int: ...
@overload
def pow(__base: int, __exp: Literal[0], __mod: None = ...) -> Literal[1]: ... # type: ignore[misc]
def pow(__base: int, __exp: Literal[0], __mod: None = None) -> Literal[1]: ... # type: ignore[misc]
@overload
def pow(__base: int, __exp: _PositiveInteger, __mod: None = ...) -> int: ... # type: ignore[misc]
def pow(__base: int, __exp: _PositiveInteger, __mod: None = None) -> int: ... # type: ignore[misc]
@overload
def pow(__base: int, __exp: _NegativeInteger, __mod: None = ...) -> float: ... # type: ignore[misc]
def pow(__base: int, __exp: _NegativeInteger, __mod: None = None) -> float: ... # type: ignore[misc]
@overload
def pow(__base: int, __exp: int, __mod: None = ...) -> Any: ...
def pow(__base: int, __exp: int, __mod: None = None) -> Any: ...
@overload
def pow(__base: _PositiveInteger, __exp: float, __mod: None = ...) -> float: ...
def pow(__base: _PositiveInteger, __exp: float, __mod: None = None) -> float: ...
@overload
def pow(__base: _NegativeInteger, __exp: float, __mod: None = ...) -> complex: ...
def pow(__base: _NegativeInteger, __exp: float, __mod: None = None) -> complex: ...
@overload
def pow(__base: float, __exp: int, __mod: None = ...) -> float: ...
def pow(__base: float, __exp: int, __mod: None = None) -> float: ...
@overload
def pow(__base: float, __exp: complex | _SupportsSomeKindOfPow, __mod: None = ...) -> Any: ...
def pow(__base: float, __exp: complex | _SupportsSomeKindOfPow, __mod: None = None) -> Any: ...
@overload
def pow(__base: complex, __exp: complex | _SupportsSomeKindOfPow, __mod: None = ...) -> complex: ...
def pow(__base: complex, __exp: complex | _SupportsSomeKindOfPow, __mod: None = None) -> complex: ...
@overload
def pow(__base: _SupportsPow2[_E, _T_co], __exp: _E, __mod: None = ...) -> _T_co: ...
def pow(__base: _SupportsPow2[_E, _T_co], __exp: _E, __mod: None = None) -> _T_co: ...
@overload
def pow(__base: _SupportsPow3NoneOnly[_E, _T_co], __exp: _E, __mod: None = ...) -> _T_co: ...
def pow(__base: _SupportsPow3NoneOnly[_E, _T_co], __exp: _E, __mod: None = None) -> _T_co: ...
@overload
def pow(__base: _SupportsPow3[_E, _M, _T_co], __exp: _E, __mod: _M = ...) -> _T_co: ...
def pow(__base: _SupportsPow3[_E, _M, _T_co], __exp: _E, __mod: _M) -> _T_co: ...
@overload
def pow(__base: _SupportsSomeKindOfPow, __exp: float, __mod: None = ...) -> Any: ...
def pow(__base: _SupportsSomeKindOfPow, __exp: float, __mod: None = None) -> Any: ...
@overload
def pow(__base: _SupportsSomeKindOfPow, __exp: complex, __mod: None = ...) -> complex: ...
def pow(__base: _SupportsSomeKindOfPow, __exp: complex, __mod: None = None) -> complex: ...
def quit(code: sys._ExitCode = None) -> NoReturn: ...