mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Remove Python 3.7 branches (#11238)
This commit is contained in:
@@ -6,10 +6,7 @@ from typing_extensions import SupportsIndex, TypeAlias
|
||||
_T = TypeVar("_T")
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
_SupportsFloatOrIndex: TypeAlias = SupportsFloat | SupportsIndex
|
||||
else:
|
||||
_SupportsFloatOrIndex: TypeAlias = SupportsFloat
|
||||
_SupportsFloatOrIndex: TypeAlias = SupportsFloat | SupportsIndex
|
||||
|
||||
e: float
|
||||
pi: float
|
||||
@@ -35,18 +32,12 @@ class _SupportsCeil(Protocol[_T_co]):
|
||||
def ceil(__x: _SupportsCeil[_T]) -> _T: ...
|
||||
@overload
|
||||
def ceil(__x: _SupportsFloatOrIndex) -> int: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def comb(__n: SupportsIndex, __k: SupportsIndex) -> int: ...
|
||||
|
||||
def comb(__n: SupportsIndex, __k: SupportsIndex) -> int: ...
|
||||
def copysign(__x: _SupportsFloatOrIndex, __y: _SupportsFloatOrIndex) -> float: ...
|
||||
def cos(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
def cosh(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
def degrees(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def dist(__p: Iterable[_SupportsFloatOrIndex], __q: Iterable[_SupportsFloatOrIndex]) -> float: ...
|
||||
|
||||
def dist(__p: Iterable[_SupportsFloatOrIndex], __q: Iterable[_SupportsFloatOrIndex]) -> float: ...
|
||||
def erf(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
def erfc(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
def exp(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
@@ -56,12 +47,7 @@ if sys.version_info >= (3, 11):
|
||||
|
||||
def expm1(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
def fabs(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def factorial(__x: SupportsIndex) -> int: ...
|
||||
|
||||
else:
|
||||
def factorial(__x: int) -> int: ...
|
||||
def factorial(__x: SupportsIndex) -> int: ...
|
||||
|
||||
class _SupportsFloor(Protocol[_T_co]):
|
||||
def __floor__(self) -> _T_co: ...
|
||||
@@ -81,12 +67,7 @@ if sys.version_info >= (3, 9):
|
||||
else:
|
||||
def gcd(__x: SupportsIndex, __y: SupportsIndex) -> int: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def hypot(*coordinates: _SupportsFloatOrIndex) -> float: ...
|
||||
|
||||
else:
|
||||
def hypot(__x: _SupportsFloatOrIndex, __y: _SupportsFloatOrIndex) -> float: ...
|
||||
|
||||
def hypot(*coordinates: _SupportsFloatOrIndex) -> float: ...
|
||||
def isclose(
|
||||
a: _SupportsFloatOrIndex,
|
||||
b: _SupportsFloatOrIndex,
|
||||
@@ -97,9 +78,7 @@ def isclose(
|
||||
def isinf(__x: _SupportsFloatOrIndex) -> bool: ...
|
||||
def isfinite(__x: _SupportsFloatOrIndex) -> bool: ...
|
||||
def isnan(__x: _SupportsFloatOrIndex) -> bool: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def isqrt(__n: SupportsIndex) -> int: ...
|
||||
def isqrt(__n: SupportsIndex) -> int: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def lcm(*integers: SupportsIndex) -> int: ...
|
||||
@@ -118,17 +97,12 @@ if sys.version_info >= (3, 12):
|
||||
elif sys.version_info >= (3, 9):
|
||||
def nextafter(__x: _SupportsFloatOrIndex, __y: _SupportsFloatOrIndex) -> float: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def perm(__n: SupportsIndex, __k: SupportsIndex | None = None) -> int: ...
|
||||
|
||||
def perm(__n: SupportsIndex, __k: SupportsIndex | None = None) -> int: ...
|
||||
def pow(__x: _SupportsFloatOrIndex, __y: _SupportsFloatOrIndex) -> float: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
@overload
|
||||
def prod(__iterable: Iterable[SupportsIndex], *, start: SupportsIndex = 1) -> int: ... # type: ignore[overload-overlap]
|
||||
@overload
|
||||
def prod(__iterable: Iterable[_SupportsFloatOrIndex], *, start: _SupportsFloatOrIndex = 1) -> float: ...
|
||||
|
||||
@overload
|
||||
def prod(__iterable: Iterable[SupportsIndex], *, start: SupportsIndex = 1) -> int: ... # type: ignore[overload-overlap]
|
||||
@overload
|
||||
def prod(__iterable: Iterable[_SupportsFloatOrIndex], *, start: _SupportsFloatOrIndex = 1) -> float: ...
|
||||
def radians(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
def remainder(__x: _SupportsFloatOrIndex, __y: _SupportsFloatOrIndex) -> float: ...
|
||||
def sin(__x: _SupportsFloatOrIndex) -> float: ...
|
||||
|
||||
Reference in New Issue
Block a user