fractions: remove _normalize, update for py312 (#10218)

This commit is contained in:
Shantanu authored and GitHub committed 2023-05-25 10:21:19 +01:00
1 parent a4e33d4053
commit 854c453910
2 files changed
+8 -4

No files matched your search

+4 -4
View File
@@ -22,11 +22,9 @@ else:
class Fraction(Rational):
@overload
def __new__(
cls, numerator: int | Rational = 0, denominator: int | Rational | None = None, *, _normalize: bool = True
) -> Self: ...
def __new__(cls, numerator: int | Rational = 0, denominator: int | Rational | None = None) -> Self: ...
@overload
def __new__(cls, __value: float | Decimal | str, *, _normalize: bool = True) -> Self: ...
def __new__(cls, __value: float | Decimal | str) -> Self: ...
@classmethod
def from_float(cls, f: float) -> Self: ...
@classmethod
@@ -34,6 +32,8 @@ class Fraction(Rational):
def limit_denominator(self, max_denominator: int = 1000000) -> Fraction: ...
if sys.version_info >= (3, 8):
def as_integer_ratio(self) -> tuple[int, int]: ...
if sys.version_info >= (3, 12):
def is_integer(self) -> bool: ...
@property
def numerator(a) -> int: ...