Files
typeshed/stdlib/struct.pyi
Sebastian Rittau 841a365284 Remove compatibility aliases (#5464)
* Remove compatibility aliases

Remove a few instances of Text

Use aliases from _typeshed

* Remove unused imports
2021-05-15 20:49:20 +03:00

26 lines
1.2 KiB
Python

import sys
from _typeshed import ReadableBuffer, WriteableBuffer
from typing import Any, Iterator, Tuple, Union
class error(Exception): ...
def pack(fmt: Union[str, bytes], *v: Any) -> bytes: ...
def pack_into(fmt: Union[str, bytes], buffer: WriteableBuffer, offset: int, *v: Any) -> None: ...
def unpack(__format: Union[str, bytes], __buffer: ReadableBuffer) -> Tuple[Any, ...]: ...
def unpack_from(__format: Union[str, bytes], buffer: ReadableBuffer, offset: int = ...) -> Tuple[Any, ...]: ...
def iter_unpack(__format: Union[str, bytes], __buffer: ReadableBuffer) -> Iterator[Tuple[Any, ...]]: ...
def calcsize(__format: Union[str, bytes]) -> int: ...
class Struct:
if sys.version_info >= (3, 7):
format: str
else:
format: bytes
size: int
def __init__(self, format: Union[str, bytes]) -> None: ...
def pack(self, *v: Any) -> bytes: ...
def pack_into(self, buffer: WriteableBuffer, offset: int, *v: Any) -> None: ...
def unpack(self, __buffer: ReadableBuffer) -> Tuple[Any, ...]: ...
def unpack_from(self, buffer: ReadableBuffer, offset: int = ...) -> Tuple[Any, ...]: ...
def iter_unpack(self, __buffer: ReadableBuffer) -> Iterator[Tuple[Any, ...]]: ...