From b0eb6c2eae98d68e0bd3c7927a438dc3c1582ffb Mon Sep 17 00:00:00 2001 From: Josh Morton Date: Sat, 9 Feb 2019 06:29:49 -0800 Subject: [PATCH] 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 --- stdlib/3/email/charset.pyi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stdlib/3/email/charset.pyi b/stdlib/3/email/charset.pyi index 5c674e452..979726607 100644 --- a/stdlib/3/email/charset.pyi +++ b/stdlib/3/email/charset.pyi @@ -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: ...