Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions stdlib/quopri.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from typing import BinaryIO
from _typeshed import ReadableBuffer, SupportsNoArgReadline, SupportsRead, SupportsWrite
from typing import Protocol

__all__ = ["encode", "decode", "encodestring", "decodestring"]

def encode(input: BinaryIO, output: BinaryIO, quotetabs: int, header: int = ...) -> None: ...
def encodestring(s: bytes, quotetabs: int = ..., header: int = ...) -> bytes: ...
def decode(input: BinaryIO, output: BinaryIO, header: int = ...) -> None: ...
def decodestring(s: bytes, header: int = ...) -> bytes: ...
class _Input(SupportsRead[bytes], SupportsNoArgReadline[bytes], Protocol): ...

def encode(input: _Input, output: SupportsWrite[bytes], quotetabs: int, header: int = ...) -> None: ...
def encodestring(s: ReadableBuffer, quotetabs: int = ..., header: int = ...) -> bytes: ...
def decode(input: _Input, output: SupportsWrite[bytes], header: int = ...) -> None: ...
def decodestring(s: str | ReadableBuffer, header: int = ...) -> bytes: ...