mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
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:
committed by
Sebastian Rittau
parent
c5713205ff
commit
b0eb6c2eae
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user