Reduce code duplication in the email module (#7558)

This commit is contained in:
Alex Waygood
2022-04-06 11:20:14 +01:00
committed by GitHub
parent 1ceb486b75
commit 3c85f36b7f
10 changed files with 31 additions and 35 deletions

View File

@@ -1,8 +1,9 @@
from email import _ParamsType, _ParamType
from email.charset import Charset
from email.contentmanager import ContentManager
from email.errors import MessageDefect
from email.policy import Policy
from typing import Any, Generator, Iterator, Sequence, TypeVar, Union
from typing import Any, Generator, Iterator, Sequence, TypeVar
__all__ = ["Message", "EmailMessage"]
@@ -10,8 +11,6 @@ _T = TypeVar("_T")
_PayloadType = list[Message] | str | bytes
_CharsetType = Charset | str | None
_ParamsType = Union[str, None, tuple[str, str | None, str]]
_ParamType = Union[str, tuple[str | None, str | None, str]]
_HeaderType = Any
class Message: