--- /dev/null
+# Stubs for numbers (Python 3.5)\r
+# See https://docs.python.org/2.7/library/numbers.html\r
+# and https://docs.python.org/3/library/numbers.html\r
+#\r
+# Note: these stubs are incomplete. The more complex type\r
+# signatures are currently omitted.\r
+\r
+from typing import Optional, SupportsFloat\r
+from abc import ABCMeta, abstractmethod\r
+import sys\r
+\r
+class Number(metaclass=ABCMeta):\r
+ @abstractmethod\r
+ def __hash__(self) -> int: ...\r
+\r
+class Complex(Number):\r
+ @abstractmethod\r
+ def __complex__(self) -> complex: ...\r
+ if sys.version_info >= (3, 0):\r
+ def __bool__(self) -> bool: ...\r
+ else:\r
+ def __nonzero__(self) -> bool: ...\r
+ @property\r
+ @abstractmethod\r
+ def real(self): ...\r
+ @property\r
+ @abstractmethod\r
+ def imag(self): ...\r
+ @abstractmethod\r
+ def __add__(self, other): ...\r
+ @abstractmethod\r
+ def __radd__(self, other): ...\r
+ @abstractmethod\r
+ def __neg__(self): ...\r
+ @abstractmethod\r
+ def __pos__(self): ...\r
+ def __sub__(self, other): ...\r
+ def __rsub__(self, other): ...\r
+ @abstractmethod\r
+ def __mul__(self, other): ...\r
+ @abstractmethod\r
+ def __rmul__(self, other): ...\r
+ if sys.version_info < (3, 0):\r
+ @abstractmethod\r
+ def __div__(self, other): ...\r
+ @abstractmethod\r
+ def __rdiv__(self, other): ...\r
+ @abstractmethod\r
+ def __truediv__(self, other): ...\r
+ @abstractmethod\r
+ def __rtruediv__(self, other): ...\r
+ @abstractmethod\r
+ def __pow__(self, exponent): ...\r
+ @abstractmethod\r
+ def __rpow__(self, base): ...\r
+ def __abs__(self): ...\r
+ def conjugate(self): ...\r
+ def __eq__(self, other: object) -> bool: ...\r
+ if sys.version_info < (3, 0):\r
+ def __ne__(self, other: object) -> bool: ...\r
+\r
+class Real(Complex, SupportsFloat):\r
+ @abstractmethod\r
+ def __float__(self) -> float: ...\r
+ @abstractmethod\r
+ def __trunc__(self) -> int: ...\r
+ if sys.version_info >= (3, 0):\r
+ @abstractmethod\r
+ def __floor__(self) -> int: ...\r
+ @abstractmethod\r
+ def __ceil__(self) -> int: ...\r
+ @abstractmethod\r
+ def __round__(self, ndigits: Optional[int] = ...): ...\r
+ def __divmod__(self, other): ...\r
+ def __rdivmod__(self, other): ...\r
+ @abstractmethod\r
+ def __floordiv__(self, other): ...\r
+ @abstractmethod\r
+ def __rfloordiv__(self, other): ...\r
+ @abstractmethod\r
+ def __mod__(self, other): ...\r
+ @abstractmethod\r
+ def __rmod__(self, other): ...\r
+ @abstractmethod\r
+ def __lt__(self, other) -> bool: ...\r
+ @abstractmethod\r
+ def __le__(self, other) -> bool: ...\r
+ def __complex__(self) -> complex: ...\r
+ @property\r
+ def real(self): ...\r
+ @property\r
+ def imag(self): ...\r
+ def conjugate(self): ...\r
+\r
+class Rational(Real):\r
+ @property\r
+ @abstractmethod\r
+ def numerator(self) -> int: ...\r
+ @property\r
+ @abstractmethod\r
+ def denominator(self) -> int: ...\r
+ def __float__(self) -> float: ...\r
+\r
+class Integral(Rational):\r
+ if sys.version_info >= (3, 0):\r
+ @abstractmethod\r
+ def __int__(self) -> int: ...\r
+ else:\r
+ @abstractmethod\r
+ def __long__(self) -> long: ...\r
+ def __index__(self) -> int: ...\r
+ @abstractmethod\r
+ def __pow__(self, exponent, modulus=None): ...\r
+ @abstractmethod\r
+ def __lshift__(self, other): ...\r
+ @abstractmethod\r
+ def __rlshift__(self, other): ...\r
+ @abstractmethod\r
+ def __rshift__(self, other): ...\r
+ @abstractmethod\r
+ def __rrshift__(self, other): ...\r
+ @abstractmethod\r
+ def __and__(self, other): ...\r
+ @abstractmethod\r
+ def __rand__(self, other): ...\r
+ @abstractmethod\r
+ def __xor__(self, other): ...\r
+ @abstractmethod\r
+ def __rxor__(self, other): ...\r
+ @abstractmethod\r
+ def __or__(self, other): ...\r
+ @abstractmethod\r
+ def __ror__(self, other): ...\r
+ @abstractmethod\r
+ def __invert__(self): ...\r
+ def __float__(self) -> float: ...\r
+ @property\r
+ def numerator(self) -> int: ...\r
+ @property\r
+ def denominator(self) -> int: ...\r