mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-28 04:22:21 +08:00
fractions: make Fraction satisfy SupportsRound (#4697)
Helps with https://github.com/python/mypy/issues/9628 Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -143,9 +143,9 @@ class Fraction(Rational):
|
||||
def __floor__(self) -> int: ...
|
||||
def __ceil__(self) -> int: ...
|
||||
@overload
|
||||
def __round__(self, ndigits: int) -> Fraction: ...
|
||||
@overload
|
||||
def __round__(self, ndigits: None = ...) -> int: ...
|
||||
@overload
|
||||
def __round__(self, ndigits: int) -> Fraction: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __lt__(self, other: _ComparableNum) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user