Skip to content

Commit

Permalink
Typeshed cherry-pick: Use import instead of type alias in `email/mess…
Browse files Browse the repository at this point in the history
…age.pyi` (#7022) (#12340)

Co-authored-by: Chris Rose <[email protected]>
  • Loading branch information
2 people authored and JukkaL committed Mar 14, 2022
1 parent 48ff811 commit 8c11393
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 8c11393

Please sign in to comment.