File: _struct.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (22 lines) | stat: -rw-r--r-- 819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Stub file for the '_struct' module."""

from typing import Any, AnyStr, Tuple

class error(Exception): ...

class Struct(object):
    size = ...  # type: int
    format = ...  # type: str

    def __init__(self, fmt: str) -> None: ...
    def pack_into(self, buffer: bytearray, offset: int, obj: Any) -> None: ...
    def pack(self, *args) -> str: ...
    def unpack(self, s: str) -> Tuple[Any]: ...
    def unpack_from(self, buffer: bytearray, offset: int = ...) -> Tuple[Any]: ...

def _clearcache() -> None: ...
def calcsize(fmt: str) -> int: ...
def pack(fmt: AnyStr, obj: Any) -> str: ...
def pack_into(fmt: AnyStr, buffer: bytearray, offset: int, obj: Any) -> None: ...
def unpack(fmt: AnyStr, data: str) -> Tuple[Any]: ...
def unpack_from(fmt: AnyStr, buffer: bytearray, offset: int = ...) -> Tuple[Any]: ...