Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any, Iterator, List, Optional
from typing import Any, Iterator, List
QP: int # undocumented
BASE64: int # undocumented
@@ -8,12 +8,12 @@ class Charset:
input_charset: str
header_encoding: int
body_encoding: int
output_charset: Optional[str]
input_codec: Optional[str]
output_codec: Optional[str]
output_charset: str | None
input_codec: str | None
output_codec: str | None
def __init__(self, input_charset: str = ...) -> None: ...
def get_body_encoding(self) -> str: ...
def get_output_charset(self) -> Optional[str]: ...
def get_output_charset(self) -> str | None: ...
def header_encode(self, string: str) -> str: ...
def header_encode_lines(self, string: str, maxlengths: Iterator[int]) -> List[str]: ...
def body_encode(self, string: str) -> str: ...
@@ -22,7 +22,7 @@ class Charset:
def __ne__(self, other: Any) -> bool: ...
def add_charset(
charset: str, header_enc: Optional[int] = ..., body_enc: Optional[int] = ..., output_charset: Optional[str] = ...
charset: str, header_enc: int | None = ..., body_enc: int | None = ..., output_charset: str | None = ...
) -> None: ...
def add_alias(alias: str, canonical: str) -> None: ...
def add_codec(charset: str, codecname: str) -> None: ...