Added missing type annotations for fractions and numbers modules. (#4401)

Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
Eric Traut
2020-08-15 18:28:14 -07:00
committed by GitHub
parent 8059ea72f8
commit 002a444dff
2 changed files with 144 additions and 64 deletions

View File

@@ -22,42 +22,42 @@ class Complex(Number):
def __nonzero__(self) -> bool: ...
@property
@abstractmethod
def real(self): ...
def real(self) -> Any: ...
@property
@abstractmethod
def imag(self): ...
def imag(self) -> Any: ...
@abstractmethod
def __add__(self, other): ...
def __add__(self, other: Any) -> Any: ...
@abstractmethod
def __radd__(self, other): ...
def __radd__(self, other: Any) -> Any: ...
@abstractmethod
def __neg__(self): ...
def __neg__(self) -> Any: ...
@abstractmethod
def __pos__(self): ...
def __sub__(self, other): ...
def __rsub__(self, other): ...
def __pos__(self) -> Any: ...
def __sub__(self, other: Any) -> Any: ...
def __rsub__(self, other: Any) -> Any: ...
@abstractmethod
def __mul__(self, other): ...
def __mul__(self, other: Any) -> Any: ...
@abstractmethod
def __rmul__(self, other): ...
def __rmul__(self, other: Any) -> Any: ...
if sys.version_info < (3, 0):
@abstractmethod
def __div__(self, other): ...
@abstractmethod
def __rdiv__(self, other): ...
@abstractmethod
def __truediv__(self, other): ...
def __truediv__(self, other: Any) -> Any: ...
@abstractmethod
def __rtruediv__(self, other): ...
def __rtruediv__(self, other: Any) -> Any: ...
@abstractmethod
def __pow__(self, exponent): ...
def __pow__(self, exponent: Any) -> Any: ...
@abstractmethod
def __rpow__(self, base): ...
def __abs__(self): ...
def conjugate(self): ...
def __eq__(self, other: object) -> bool: ...
def __rpow__(self, base: Any) -> Any: ...
def __abs__(self) -> Real: ...
def conjugate(self) -> Any: ...
def __eq__(self, other: Any) -> bool: ...
if sys.version_info < (3, 0):
def __ne__(self, other: object) -> bool: ...
def __ne__(self, other: Any) -> bool: ...
class Real(Complex, SupportsFloat):
@abstractmethod
@@ -71,30 +71,30 @@ class Real(Complex, SupportsFloat):
def __ceil__(self) -> int: ...
@abstractmethod
@overload
def __round__(self, ndigits: None = ...): ...
def __round__(self, ndigits: int) -> Any: ...
@abstractmethod
@overload
def __round__(self, ndigits: int): ...
def __divmod__(self, other): ...
def __rdivmod__(self, other): ...
def __round__(self, ndigits: None = ...) -> int: ...
def __divmod__(self, other: Any) -> Any: ...
def __rdivmod__(self, other: Any) -> Any: ...
@abstractmethod
def __floordiv__(self, other): ...
def __floordiv__(self, other: Any) -> int: ...
@abstractmethod
def __rfloordiv__(self, other): ...
def __rfloordiv__(self, other: Any) -> int: ...
@abstractmethod
def __mod__(self, other): ...
def __mod__(self, other: Any) -> Any: ...
@abstractmethod
def __rmod__(self, other): ...
def __rmod__(self, other: Any) -> Any: ...
@abstractmethod
def __lt__(self, other) -> bool: ...
def __lt__(self, other: Any) -> bool: ...
@abstractmethod
def __le__(self, other) -> bool: ...
def __le__(self, other: Any) -> bool: ...
def __complex__(self) -> complex: ...
@property
def real(self): ...
def real(self) -> Any: ...
@property
def imag(self): ...
def conjugate(self): ...
def imag(self) -> Any: ...
def conjugate(self) -> Any: ...
class Rational(Real):
@property
@@ -114,29 +114,29 @@ class Integral(Rational):
def __long__(self) -> long: ...
def __index__(self) -> int: ...
@abstractmethod
def __pow__(self, exponent, modulus: Optional[Any] = ...): ...
def __pow__(self, exponent: Any, modulus: Optional[Any] = ...) -> Any: ...
@abstractmethod
def __lshift__(self, other): ...
def __lshift__(self, other: Any) -> Any: ...
@abstractmethod
def __rlshift__(self, other): ...
def __rlshift__(self, other: Any) -> Any: ...
@abstractmethod
def __rshift__(self, other): ...
def __rshift__(self, other: Any) -> Any: ...
@abstractmethod
def __rrshift__(self, other): ...
def __rrshift__(self, other: Any) -> Any: ...
@abstractmethod
def __and__(self, other): ...
def __and__(self, other: Any) -> Any: ...
@abstractmethod
def __rand__(self, other): ...
def __rand__(self, other: Any) -> Any: ...
@abstractmethod
def __xor__(self, other): ...
def __xor__(self, other: Any) -> Any: ...
@abstractmethod
def __rxor__(self, other): ...
def __rxor__(self, other: Any) -> Any: ...
@abstractmethod
def __or__(self, other): ...
def __or__(self, other: Any) -> Any: ...
@abstractmethod
def __ror__(self, other): ...
def __ror__(self, other: Any) -> Any: ...
@abstractmethod
def __invert__(self): ...
def __invert__(self) -> Any: ...
def __float__(self) -> float: ...
@property
def numerator(self) -> int: ...