|
| 1 | +from _typeshed import ReadableBuffer |
| 2 | +from codecs import _ReadableStream, _WritableStream |
| 3 | +from collections.abc import Iterable |
| 4 | +from typing import final, type_check_only |
| 5 | + |
| 6 | +# This class is not exposed. It calls itself _multibytecodec.MultibyteCodec. |
| 7 | +@final |
| 8 | +@type_check_only |
| 9 | +class _MultibyteCodec: |
| 10 | + def decode(self, input: ReadableBuffer, errors: str | None = None) -> str: ... |
| 11 | + def encode(self, input: str, errors: str | None = None) -> bytes: ... |
| 12 | + |
| 13 | +class MultibyteIncrementalDecoder: |
| 14 | + errors: str |
| 15 | + def __init__(self, errors: str = "strict") -> None: ... |
| 16 | + def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... |
| 17 | + def getstate(self) -> tuple[bytes, int]: ... |
| 18 | + def reset(self) -> None: ... |
| 19 | + def setstate(self, state: tuple[bytes, int], /) -> None: ... |
| 20 | + |
| 21 | +class MultibyteIncrementalEncoder: |
| 22 | + errors: str |
| 23 | + def __init__(self, errors: str = "strict") -> None: ... |
| 24 | + def encode(self, input: str, final: bool = False) -> bytes: ... |
| 25 | + def getstate(self) -> int: ... |
| 26 | + def reset(self) -> None: ... |
| 27 | + def setstate(self, state: int, /) -> None: ... |
| 28 | + |
| 29 | +class MultibyteStreamReader: |
| 30 | + errors: str |
| 31 | + stream: _ReadableStream |
| 32 | + def __init__(self, stream: _ReadableStream, errors: str = "strict") -> None: ... |
| 33 | + def read(self, sizeobj: int | None = None, /) -> str: ... |
| 34 | + def readline(self, sizeobj: int | None = None, /) -> str: ... |
| 35 | + def readlines(self, sizehintobj: int | None = None, /) -> list[str]: ... |
| 36 | + def reset(self) -> None: ... |
| 37 | + |
| 38 | +class MultibyteStreamWriter: |
| 39 | + errors: str |
| 40 | + stream: _WritableStream |
| 41 | + def __init__(self, stream: _WritableStream, errors: str = "strict") -> None: ... |
| 42 | + def reset(self) -> None: ... |
| 43 | + def write(self, strobj: str, /) -> None: ... |
| 44 | + def writelines(self, lines: Iterable[str], /) -> None: ... |
0 commit comments