construct-typing/construct-stubs/lib/py3compat.pyi

22 lines
618 B
Python
Raw Permalink Normal View History

import typing as t
2023-07-18 17:26:03 +02:00
PY: t.Tuple[int, int]
2021-01-01 22:55:48 +01:00
PY2: bool
PY3: bool
PYPY: bool
ONWINDOWS: bool
2021-01-01 22:55:48 +01:00
2021-02-20 23:52:06 +01:00
stringtypes: t.Tuple[t.Type[bytes], t.Type[str]]
integertypes: t.Tuple[t.Type[int]]
unicodestringtype: t.Type[str]
bytestringtype: t.Type[bytes]
def int2byte(character: int) -> bytes: ...
def byte2int(character: bytes) -> int: ...
def str2bytes(string: str) -> bytes: ...
def bytes2str(string: bytes) -> str: ...
def reprstring(data: t.Union[bytes, str]) -> str: ...
def trimstring(data: t.Union[bytes, str]) -> str: ...
def integers2bytes(ints: t.Iterable[int]) -> bytes: ...
def bytes2integers(data: bytes) -> list[int]: ...