diff --git a/stdlib/3/email/message.pyi b/stdlib/3/email/message.pyi index 09fbdda7a38b..957e18cc9788 100644 --- a/stdlib/3/email/message.pyi +++ b/stdlib/3/email/message.pyi @@ -16,7 +16,7 @@ _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 = Union[str, Header] +_HeaderType = Any class Message: preamble: Optional[str] @@ -34,7 +34,7 @@ class Message: def get_charset(self) -> _CharsetType: ... def __len__(self) -> int: ... def __contains__(self, name: str) -> bool: ... - def __getitem__(self, name: str) -> Optional[_HeaderType]: ... + def __getitem__(self, name: str) -> _HeaderType: ... def __setitem__(self, name: str, val: _HeaderType) -> None: ... def __delitem__(self, name: str) -> None: ... def keys(self) -> List[str]: ...