mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-28 18:56:44 +08:00
Drop Python 3.8 branches (#13776)
This commit is contained in:
+2
-13
@@ -1,24 +1,13 @@
|
||||
import sys
|
||||
from collections.abc import Callable
|
||||
from decimal import Decimal
|
||||
from numbers import Integral, Rational, Real
|
||||
from numbers import Rational, Real
|
||||
from typing import Any, Literal, Protocol, SupportsIndex, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
_ComparableNum: TypeAlias = int | float | Decimal | Real
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ["Fraction"]
|
||||
else:
|
||||
__all__ = ["Fraction", "gcd"]
|
||||
@overload
|
||||
def gcd(a: int, b: int) -> int: ...
|
||||
@overload
|
||||
def gcd(a: Integral, b: int) -> Integral: ...
|
||||
@overload
|
||||
def gcd(a: int, b: Integral) -> Integral: ...
|
||||
@overload
|
||||
def gcd(a: Integral, b: Integral) -> Integral: ...
|
||||
__all__ = ["Fraction"]
|
||||
|
||||
class _ConvertibleToIntegerRatio(Protocol):
|
||||
def as_integer_ratio(self) -> tuple[int | Rational, int | Rational]: ...
|
||||
|
||||
Reference in New Issue
Block a user