Skip to content

Commit 3730899

Browse files
authored
Define mypy_extensions.i16 in stubs (#15562)
I forgot to add this when I added mypyc support for the i16 native integer type. The mypy_extensions stubs are maintained here instead of typeshed. This is a copy of the stubs for `i32`, with references to `i32` replaced with `i16`.
1 parent 92602c5 commit 3730899

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,38 @@ class i32:
146146
def __ge__(self, x: i32) -> bool: ...
147147
def __gt__(self, x: i32) -> bool: ...
148148
def __index__(self) -> int: ...
149+
150+
class i16:
151+
@overload
152+
def __new__(cls, __x: str | ReadableBuffer | SupportsInt | SupportsIndex | SupportsTrunc = ...) -> i16: ...
153+
@overload
154+
def __new__(cls, __x: str | bytes | bytearray, base: SupportsIndex) -> i16: ...
155+
156+
def __add__(self, x: i16) -> i16: ...
157+
def __radd__(self, x: i16) -> i16: ...
158+
def __sub__(self, x: i16) -> i16: ...
159+
def __rsub__(self, x: i16) -> i16: ...
160+
def __mul__(self, x: i16) -> i16: ...
161+
def __rmul__(self, x: i16) -> i16: ...
162+
def __floordiv__(self, x: i16) -> i16: ...
163+
def __rfloordiv__(self, x: i16) -> i16: ...
164+
def __mod__(self, x: i16) -> i16: ...
165+
def __rmod__(self, x: i16) -> i16: ...
166+
def __and__(self, x: i16) -> i16: ...
167+
def __rand__(self, x: i16) -> i16: ...
168+
def __or__(self, x: i16) -> i16: ...
169+
def __ror__(self, x: i16) -> i16: ...
170+
def __xor__(self, x: i16) -> i16: ...
171+
def __rxor__(self, x: i16) -> i16: ...
172+
def __lshift__(self, x: i16) -> i16: ...
173+
def __rlshift__(self, x: i16) -> i16: ...
174+
def __rshift__(self, x: i16) -> i16: ...
175+
def __rrshift__(self, x: i16) -> i16: ...
176+
def __neg__(self) -> i16: ...
177+
def __invert__(self) -> i16: ...
178+
def __pos__(self) -> i16: ...
179+
def __lt__(self, x: i16) -> bool: ...
180+
def __le__(self, x: i16) -> bool: ...
181+
def __ge__(self, x: i16) -> bool: ...
182+
def __gt__(self, x: i16) -> bool: ...
183+
def __index__(self) -> int: ...

0 commit comments

Comments
 (0)