massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / numbers.pyi
1 # Note: these stubs are incomplete. The more complex type
2 # signatures are currently omitted.
3
4 from abc import ABCMeta, abstractmethod
5 from typing import Any, SupportsFloat, overload
6
7 class Number(metaclass=ABCMeta):
8     @abstractmethod
9     def __hash__(self) -> int: ...
10
11 class Complex(Number):
12     @abstractmethod
13     def __complex__(self) -> complex: ...
14     def __bool__(self) -> bool: ...
15     @property
16     @abstractmethod
17     def real(self) -> Any: ...
18     @property
19     @abstractmethod
20     def imag(self) -> Any: ...
21     @abstractmethod
22     def __add__(self, other: Any) -> Any: ...
23     @abstractmethod
24     def __radd__(self, other: Any) -> Any: ...
25     @abstractmethod
26     def __neg__(self) -> Any: ...
27     @abstractmethod
28     def __pos__(self) -> Any: ...
29     def __sub__(self, other: Any) -> Any: ...
30     def __rsub__(self, other: Any) -> Any: ...
31     @abstractmethod
32     def __mul__(self, other: Any) -> Any: ...
33     @abstractmethod
34     def __rmul__(self, other: Any) -> Any: ...
35     @abstractmethod
36     def __truediv__(self, other: Any) -> Any: ...
37     @abstractmethod
38     def __rtruediv__(self, other: Any) -> Any: ...
39     @abstractmethod
40     def __pow__(self, exponent: Any) -> Any: ...
41     @abstractmethod
42     def __rpow__(self, base: Any) -> Any: ...
43     def __abs__(self) -> Real: ...
44     def conjugate(self) -> Any: ...
45     def __eq__(self, other: Any) -> bool: ...
46
47 class Real(Complex, SupportsFloat):
48     @abstractmethod
49     def __float__(self) -> float: ...
50     @abstractmethod
51     def __trunc__(self) -> int: ...
52     @abstractmethod
53     def __floor__(self) -> int: ...
54     @abstractmethod
55     def __ceil__(self) -> int: ...
56     @abstractmethod
57     @overload
58     def __round__(self, ndigits: None = ...) -> int: ...
59     @abstractmethod
60     @overload
61     def __round__(self, ndigits: int) -> Any: ...
62     def __divmod__(self, other: Any) -> Any: ...
63     def __rdivmod__(self, other: Any) -> Any: ...
64     @abstractmethod
65     def __floordiv__(self, other: Any) -> int: ...
66     @abstractmethod
67     def __rfloordiv__(self, other: Any) -> int: ...
68     @abstractmethod
69     def __mod__(self, other: Any) -> Any: ...
70     @abstractmethod
71     def __rmod__(self, other: Any) -> Any: ...
72     @abstractmethod
73     def __lt__(self, other: Any) -> bool: ...
74     @abstractmethod
75     def __le__(self, other: Any) -> bool: ...
76     def __complex__(self) -> complex: ...
77     @property
78     def real(self) -> Any: ...
79     @property
80     def imag(self) -> Any: ...
81     def conjugate(self) -> Any: ...
82
83 class Rational(Real):
84     @property
85     @abstractmethod
86     def numerator(self) -> int: ...
87     @property
88     @abstractmethod
89     def denominator(self) -> int: ...
90     def __float__(self) -> float: ...
91
92 class Integral(Rational):
93     @abstractmethod
94     def __int__(self) -> int: ...
95     def __index__(self) -> int: ...
96     @abstractmethod
97     def __pow__(self, exponent: Any, modulus: Any | None = ...) -> Any: ...
98     @abstractmethod
99     def __lshift__(self, other: Any) -> Any: ...
100     @abstractmethod
101     def __rlshift__(self, other: Any) -> Any: ...
102     @abstractmethod
103     def __rshift__(self, other: Any) -> Any: ...
104     @abstractmethod
105     def __rrshift__(self, other: Any) -> Any: ...
106     @abstractmethod
107     def __and__(self, other: Any) -> Any: ...
108     @abstractmethod
109     def __rand__(self, other: Any) -> Any: ...
110     @abstractmethod
111     def __xor__(self, other: Any) -> Any: ...
112     @abstractmethod
113     def __rxor__(self, other: Any) -> Any: ...
114     @abstractmethod
115     def __or__(self, other: Any) -> Any: ...
116     @abstractmethod
117     def __ror__(self, other: Any) -> Any: ...
118     @abstractmethod
119     def __invert__(self) -> Any: ...
120     def __float__(self) -> float: ...
121     @property
122     def numerator(self) -> int: ...
123     @property
124     def denominator(self) -> int: ...