mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Fix and comment type mismatches in email library hints (#10437)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
from collections.abc import Iterator
|
||||
from collections.abc import Callable, Iterator
|
||||
from email.message import Message
|
||||
from typing import overload
|
||||
|
||||
__all__ = ["Charset", "add_alias", "add_charset", "add_codec"]
|
||||
|
||||
@@ -14,10 +16,13 @@ class Charset:
|
||||
input_codec: str | None
|
||||
output_codec: str | None
|
||||
def __init__(self, input_charset: str = "us-ascii") -> None: ...
|
||||
def get_body_encoding(self) -> str: ...
|
||||
def get_body_encoding(self) -> str | Callable[[Message], None]: ...
|
||||
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]: ...
|
||||
@overload
|
||||
def body_encode(self, string: None) -> None: ...
|
||||
@overload
|
||||
def body_encode(self, string: str) -> str: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, __value: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user