Improve the stubs in charset.pyi under python3. (#2768)

The python3 charset stubs didn't include certain necessary module level
constansts (like `QP`) and wrongly defined the arguments to some of
the functions in the module. This is no longer the case.

Fixes #2767
This commit is contained in:
Josh Morton
2019-02-09 06:29:49 -08:00
committed by Sebastian Rittau
parent c5713205ff
commit b0eb6c2eae

View File

@@ -2,6 +2,10 @@
from typing import List, Optional, Iterator, Any
QP: int
BASE64: int
SHORTEST: int
class Charset:
input_charset = ... # type: str
header_encoding = ... # type: int
@@ -20,7 +24,7 @@ class Charset:
def __eq__(self, other: Any) -> bool: ...
def __ne__(self, other: Any) -> bool: ...
def add_charset(charset: Charset, header_enc: Optional[int] = ...,
def add_charset(charset: str, header_enc: Optional[int] = ...,
body_enc: Optional[int] = ...,
output_charset: Optional[str] = ...) -> None: ...
def add_alias(alias: str, canonical: str) -> None: ...