struct: fix arg names, mark positional-only args (#3792)

This commit is contained in:
Shantanu
2020-02-29 05:42:04 -08:00
committed by GitHub
parent 0705cd6435
commit b94d23c608
3 changed files with 6 additions and 16 deletions

View File

@@ -20,12 +20,12 @@ else:
def pack(fmt: _FmtType, *v: Any) -> bytes: ...
def pack_into(fmt: _FmtType, buffer: _WriteBufferType, offset: int, *v: Any) -> None: ...
def unpack(fmt: _FmtType, buffer: _BufferType) -> Tuple[Any, ...]: ...
def unpack_from(fmt: _FmtType, buffer: _BufferType, offset: int = ...) -> Tuple[Any, ...]: ...
def unpack(__format: _FmtType, __buffer: _BufferType) -> Tuple[Any, ...]: ...
def unpack_from(__format: _FmtType, buffer: _BufferType, offset: int = ...) -> Tuple[Any, ...]: ...
if sys.version_info >= (3, 4):
def iter_unpack(fmt: _FmtType, buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
def iter_unpack(__format: _FmtType, __buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
def calcsize(fmt: _FmtType) -> int: ...
def calcsize(__format: _FmtType) -> int: ...
class Struct:
if sys.version_info >= (3, 7):
@@ -38,7 +38,7 @@ class Struct:
def pack(self, *v: Any) -> bytes: ...
def pack_into(self, buffer: _WriteBufferType, offset: int, *v: Any) -> None: ...
def unpack(self, buffer: _BufferType) -> Tuple[Any, ...]: ...
def unpack(self, __buffer: _BufferType) -> Tuple[Any, ...]: ...
def unpack_from(self, buffer: _BufferType, offset: int = ...) -> Tuple[Any, ...]: ...
if sys.version_info >= (3, 4):
def iter_unpack(self, buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
def iter_unpack(self, __buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...