1 # Note: these stubs are incomplete. The more complex type
2 # signatures are currently omitted.
4 from abc import ABCMeta, abstractmethod
5 from typing import Any, SupportsFloat, overload
7 class Number(metaclass=ABCMeta):
9 def __hash__(self) -> int: ...
11 class Complex(Number):
13 def __complex__(self) -> complex: ...
14 def __bool__(self) -> bool: ...
17 def real(self) -> Any: ...
20 def imag(self) -> Any: ...
22 def __add__(self, other: Any) -> Any: ...
24 def __radd__(self, other: Any) -> Any: ...
26 def __neg__(self) -> Any: ...
28 def __pos__(self) -> Any: ...
29 def __sub__(self, other: Any) -> Any: ...
30 def __rsub__(self, other: Any) -> Any: ...
32 def __mul__(self, other: Any) -> Any: ...
34 def __rmul__(self, other: Any) -> Any: ...
36 def __truediv__(self, other: Any) -> Any: ...
38 def __rtruediv__(self, other: Any) -> Any: ...
40 def __pow__(self, exponent: Any) -> Any: ...
42 def __rpow__(self, base: Any) -> Any: ...
43 def __abs__(self) -> Real: ...
44 def conjugate(self) -> Any: ...
45 def __eq__(self, other: Any) -> bool: ...
47 class Real(Complex, SupportsFloat):
49 def __float__(self) -> float: ...
51 def __trunc__(self) -> int: ...
53 def __floor__(self) -> int: ...
55 def __ceil__(self) -> int: ...
58 def __round__(self, ndigits: None = ...) -> int: ...
61 def __round__(self, ndigits: int) -> Any: ...
62 def __divmod__(self, other: Any) -> Any: ...
63 def __rdivmod__(self, other: Any) -> Any: ...
65 def __floordiv__(self, other: Any) -> int: ...
67 def __rfloordiv__(self, other: Any) -> int: ...
69 def __mod__(self, other: Any) -> Any: ...
71 def __rmod__(self, other: Any) -> Any: ...
73 def __lt__(self, other: Any) -> bool: ...
75 def __le__(self, other: Any) -> bool: ...
76 def __complex__(self) -> complex: ...
78 def real(self) -> Any: ...
80 def imag(self) -> Any: ...
81 def conjugate(self) -> Any: ...
86 def numerator(self) -> int: ...
89 def denominator(self) -> int: ...
90 def __float__(self) -> float: ...
92 class Integral(Rational):
94 def __int__(self) -> int: ...
95 def __index__(self) -> int: ...
97 def __pow__(self, exponent: Any, modulus: Any | None = ...) -> Any: ...
99 def __lshift__(self, other: Any) -> Any: ...
101 def __rlshift__(self, other: Any) -> Any: ...
103 def __rshift__(self, other: Any) -> Any: ...
105 def __rrshift__(self, other: Any) -> Any: ...
107 def __and__(self, other: Any) -> Any: ...
109 def __rand__(self, other: Any) -> Any: ...
111 def __xor__(self, other: Any) -> Any: ...
113 def __rxor__(self, other: Any) -> Any: ...
115 def __or__(self, other: Any) -> Any: ...
117 def __ror__(self, other: Any) -> Any: ...
119 def __invert__(self) -> Any: ...
120 def __float__(self) -> float: ...
122 def numerator(self) -> int: ...
124 def denominator(self) -> int: ...