Skip to content

Commit d086488

Browse files
authored
Revert "Use import instead of type alias in email/message.pyi" (#7548)
Let's see if this is fixed in mypy 0.942. This reverts the changes made in #7022, which was a hack to fix #7019
1 parent 4b63f34 commit d086488

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

stdlib/email/message.pyi

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

97
__all__ = ["Message", "EmailMessage"]
108

@@ -14,6 +12,7 @@ _PayloadType = list[Message] | str | bytes
1412
_CharsetType = Charset | str | None
1513
_ParamsType = Union[str, None, tuple[str, str | None, str]]
1614
_ParamType = Union[str, tuple[str | None, str | None, str]]
15+
_HeaderType = Any
1716

1817
class Message:
1918
policy: Policy # undocumented

0 commit comments

Comments
 (0)