mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 05:11:09 +08:00
Add __round__ to int and float in Python 3 (#2061)
This commit is contained in:
committed by
Jelle Zijlstra
parent
55a3bad0f8
commit
5223b26ec8
@@ -143,6 +143,7 @@ class int:
|
||||
def __neg__(self) -> int: ...
|
||||
def __pos__(self) -> int: ...
|
||||
def __invert__(self) -> int: ...
|
||||
def __round__(self, ndigits: int = ...) -> int: ...
|
||||
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ne__(self, x: object) -> bool: ...
|
||||
@@ -182,6 +183,10 @@ class float:
|
||||
def __rmod__(self, x: float) -> float: ...
|
||||
def __rdivmod__(self, x: float) -> Tuple[float, float]: ...
|
||||
def __rpow__(self, x: float) -> float: ...
|
||||
@overload
|
||||
def __round__(self) -> int: ...
|
||||
@overload
|
||||
def __round__(self, ndigits: int) -> float: ...
|
||||
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ne__(self, x: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user