email: improve bytes handling (#9032)

This commit is contained in:
Jelle Zijlstra
2022-11-01 02:13:30 -07:00
committed by GitHub
parent 3e46f9a9ee
commit 7ab933f3c3
10 changed files with 26 additions and 19 deletions
+7 -5
View File
@@ -1,3 +1,5 @@
from collections.abc import Iterable
__all__ = [
"body_decode",
"body_encode",
@@ -13,11 +15,11 @@ __all__ = [
def header_check(octet: int) -> bool: ...
def body_check(octet: int) -> bool: ...
def header_length(bytearray: bytes) -> int: ...
def body_length(bytearray: bytes) -> int: ...
def unquote(s: str | bytes) -> str: ...
def quote(c: str | bytes) -> str: ...
def header_encode(header_bytes: bytes, charset: str = ...) -> str: ...
def header_length(bytearray: Iterable[int]) -> int: ...
def body_length(bytearray: Iterable[int]) -> int: ...
def unquote(s: str | bytes | bytearray) -> str: ...
def quote(c: str | bytes | bytearray) -> str: ...
def header_encode(header_bytes: bytes | bytearray, charset: str = ...) -> str: ...
def body_encode(body: str, maxlinelen: int = ..., eol: str = ...) -> str: ...
def decode(encoded: str, eol: str = ...) -> str: ...
def header_decode(s: str) -> str: ...