mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Use Literal["little", "big"] for byteorder (#5715)
This commit is contained in:
@@ -186,10 +186,10 @@ class int:
|
||||
def bit_length(self) -> int: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
def bit_count(self) -> int: ...
|
||||
def to_bytes(self, length: int, byteorder: str, *, signed: bool = ...) -> bytes: ...
|
||||
def to_bytes(self, length: int, byteorder: Literal["little", "big"], *, signed: bool = ...) -> bytes: ...
|
||||
@classmethod
|
||||
def from_bytes(
|
||||
cls, bytes: Union[Iterable[int], SupportsBytes], byteorder: str, *, signed: bool = ...
|
||||
cls, bytes: Union[Iterable[int], SupportsBytes], byteorder: Literal["little", "big"], *, signed: bool = ...
|
||||
) -> int: ... # TODO buffer object argument
|
||||
def __add__(self, x: int) -> int: ...
|
||||
def __sub__(self, x: int) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user