Skip to content

Revert "Use import instead of type alias in email/message.pyi" #7548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions stdlib/email/message.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ from email.charset import Charset
from email.contentmanager import ContentManager
from email.errors import MessageDefect
from email.policy import Policy

# using a type alias ("_HeaderType = Any") breaks mypy, who knows why
from typing import Any, Any as _HeaderType, Generator, Iterator, Sequence, TypeVar, Union
from typing import Any, Generator, Iterator, Sequence, TypeVar, Union

__all__ = ["Message", "EmailMessage"]

Expand All @@ -14,6 +12,7 @@ _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:
policy: Policy # undocumented
Expand Down