mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add attributes to int and float (#2529)
* real, imag, conjugate all exist on int and float * numerator, denominator exists on int
This commit is contained in:
committed by
Sebastian Rittau
parent
f07bdf418b
commit
a437fcc886
@@ -95,6 +95,16 @@ class int:
|
||||
@overload
|
||||
def __init__(self, x: Union[str, unicode, bytearray], base: int = ...) -> None: ...
|
||||
|
||||
@property
|
||||
def real(self) -> int: ...
|
||||
@property
|
||||
def imag(self) -> int: ...
|
||||
@property
|
||||
def numerator(self) -> int: ...
|
||||
@property
|
||||
def denominator(self) -> int: ...
|
||||
def conjugate(self) -> int: ...
|
||||
|
||||
def bit_length(self) -> int: ...
|
||||
|
||||
def __add__(self, x: int) -> int: ...
|
||||
@@ -152,6 +162,12 @@ class float:
|
||||
@classmethod
|
||||
def fromhex(cls, s: str) -> float: ...
|
||||
|
||||
@property
|
||||
def real(self) -> float: ...
|
||||
@property
|
||||
def imag(self) -> float: ...
|
||||
def conjugate(self) -> float: ...
|
||||
|
||||
def __add__(self, x: float) -> float: ...
|
||||
def __sub__(self, x: float) -> float: ...
|
||||
def __mul__(self, x: float) -> float: ...
|
||||
|
||||
Reference in New Issue
Block a user