Skip to content

Commit

Permalink
Define mypy_extensions.i16 in stubs (#15562)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
JukkaL authored Jul 1, 2023
1 parent 92602c5 commit 3730899
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,38 @@ class i32:
def __ge__(self, x: i32) -> bool: ...
def __gt__(self, x: i32) -> bool: ...
def __index__(self) -> int: ...

class i16:
@overload
def __new__(cls, __x: str | ReadableBuffer | SupportsInt | SupportsIndex | SupportsTrunc = ...) -> i16: ...
@overload
def __new__(cls, __x: str | bytes | bytearray, base: SupportsIndex) -> i16: ...

def __add__(self, x: i16) -> i16: ...
def __radd__(self, x: i16) -> i16: ...
def __sub__(self, x: i16) -> i16: ...
def __rsub__(self, x: i16) -> i16: ...
def __mul__(self, x: i16) -> i16: ...
def __rmul__(self, x: i16) -> i16: ...
def __floordiv__(self, x: i16) -> i16: ...
def __rfloordiv__(self, x: i16) -> i16: ...
def __mod__(self, x: i16) -> i16: ...
def __rmod__(self, x: i16) -> i16: ...
def __and__(self, x: i16) -> i16: ...
def __rand__(self, x: i16) -> i16: ...
def __or__(self, x: i16) -> i16: ...
def __ror__(self, x: i16) -> i16: ...
def __xor__(self, x: i16) -> i16: ...
def __rxor__(self, x: i16) -> i16: ...
def __lshift__(self, x: i16) -> i16: ...
def __rlshift__(self, x: i16) -> i16: ...
def __rshift__(self, x: i16) -> i16: ...
def __rrshift__(self, x: i16) -> i16: ...
def __neg__(self) -> i16: ...
def __invert__(self) -> i16: ...
def __pos__(self) -> i16: ...
def __lt__(self, x: i16) -> bool: ...
def __le__(self, x: i16) -> bool: ...
def __ge__(self, x: i16) -> bool: ...
def __gt__(self, x: i16) -> bool: ...
def __index__(self) -> int: ...

0 comments on commit 3730899

Please sign in to comment.