Skip to content

Commit 8c11393

Browse files
offbyoneJukkaL
authored andcommitted
Typeshed cherry-pick: Use import instead of type alias in email/message.pyi (#7022) (#12340)
Co-authored-by: Chris Rose <[email protected]>
1 parent 48ff811 commit 8c11393

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mypy/typeshed/stdlib/email/message.pyi

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ from email.charset import Charset
22
from email.contentmanager import ContentManager
33
from email.errors import MessageDefect
44
from email.policy import Policy
5-
from typing import Any, Generator, Iterator, Optional, Sequence, TypeVar, Union
5+
6+
# using a type alias ("_HeaderType = Any") breaks mypy, who knows why
7+
from typing import Any, Any as _HeaderType, Generator, Iterator, Optional, Sequence, TypeVar, Union
68

79
_T = TypeVar("_T")
810

911
_PayloadType = Union[list[Message], str, bytes]
1012
_CharsetType = Union[Charset, str, None]
1113
_ParamsType = Union[str, None, tuple[str, Optional[str], str]]
1214
_ParamType = Union[str, tuple[Optional[str], Optional[str], str]]
13-
_HeaderType = Any
1415

1516
class Message:
1617
policy: Policy # undocumented

0 commit comments

Comments
 (0)