Skip to content
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

Cherry pick the typeshed fix for 12339 #12340

Merged
merged 1 commit into from
Mar 14, 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: 3 additions & 2 deletions mypy/typeshed/stdlib/email/message.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ 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, Optional, Sequence, TypeVar, Union

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

_T = TypeVar("_T")

_PayloadType = Union[list[Message], str, bytes]
_CharsetType = Union[Charset, str, None]
_ParamsType = Union[str, None, tuple[str, Optional[str], str]]
_ParamType = Union[str, tuple[Optional[str], Optional[str], str]]
_HeaderType = Any

class Message:
policy: Policy # undocumented
Expand Down