mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 11:32:07 +08:00
stdlib: Improve many __iter__ and constructor methods (#7112)
This commit is contained in:
@@ -25,9 +25,9 @@ class Fraction(Rational):
|
||||
@overload
|
||||
def __new__(cls: type[Self], __value: float | Decimal | str, *, _normalize: bool = ...) -> Self: ...
|
||||
@classmethod
|
||||
def from_float(cls, f: float) -> Fraction: ...
|
||||
def from_float(cls: type[Self], f: float) -> Self: ...
|
||||
@classmethod
|
||||
def from_decimal(cls, dec: Decimal) -> Fraction: ...
|
||||
def from_decimal(cls: type[Self], dec: Decimal) -> Self: ...
|
||||
def limit_denominator(self, max_denominator: int = ...) -> Fraction: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def as_integer_ratio(self) -> tuple[int, int]: ...
|
||||
|
||||
Reference in New Issue
Block a user