mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Add several Python 3.8 annotations (#3347)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Stubs for math
|
||||
# See: http://docs.python.org/2/library/math.html
|
||||
|
||||
from typing import Tuple, Iterable, SupportsFloat, SupportsInt
|
||||
from typing import Tuple, Iterable, SupportsFloat, SupportsInt, overload
|
||||
|
||||
import sys
|
||||
|
||||
@@ -28,6 +28,8 @@ def copysign(x: SupportsFloat, y: SupportsFloat) -> float: ...
|
||||
def cos(x: SupportsFloat) -> float: ...
|
||||
def cosh(x: SupportsFloat) -> float: ...
|
||||
def degrees(x: SupportsFloat) -> float: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def dist(__p: Iterable[SupportsFloat], __q: Iterable[SupportsFloat]) -> float: ...
|
||||
def erf(x: SupportsFloat) -> float: ...
|
||||
def erfc(x: SupportsFloat) -> float: ...
|
||||
def exp(x: SupportsFloat) -> float: ...
|
||||
@@ -44,13 +46,18 @@ def fsum(iterable: Iterable[float]) -> float: ...
|
||||
def gamma(x: SupportsFloat) -> float: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def gcd(a: int, b: int) -> int: ...
|
||||
def hypot(x: SupportsFloat, y: SupportsFloat) -> float: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def hypot(*coordinates: SupportsFloat) -> float: ...
|
||||
else:
|
||||
def hypot(__x: SupportsFloat, __y: SupportsFloat) -> float: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def isclose(a: SupportsFloat, b: SupportsFloat, rel_tol: SupportsFloat = ..., abs_tol: SupportsFloat = ...) -> bool: ...
|
||||
def isinf(x: SupportsFloat) -> bool: ...
|
||||
if sys.version_info >= (3,):
|
||||
def isfinite(x: SupportsFloat) -> bool: ...
|
||||
def isnan(x: SupportsFloat) -> bool: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def isqrt(__n: int) -> int: ...
|
||||
def ldexp(x: SupportsFloat, i: int) -> float: ...
|
||||
def lgamma(x: SupportsFloat) -> float: ...
|
||||
def log(x: SupportsFloat, base: SupportsFloat = ...) -> float: ...
|
||||
@@ -60,6 +67,11 @@ if sys.version_info >= (3, 3):
|
||||
def log2(x: SupportsFloat) -> float: ...
|
||||
def modf(x: SupportsFloat) -> Tuple[float, float]: ...
|
||||
def pow(x: SupportsFloat, y: SupportsFloat) -> float: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
@overload
|
||||
def prod(__iterable: Iterable[int], *, start: int = ...) -> int: ... # type: ignore
|
||||
@overload
|
||||
def prod(__iterable: Iterable[SupportsFloat], *, start: SupportsFloat = ...) -> float: ...
|
||||
def radians(x: SupportsFloat) -> float: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def remainder(x: SupportsFloat, y: SupportsFloat) -> float: ...
|
||||
|
||||
Reference in New Issue
Block a user