diff --git a/stdlib/email/message.pyi b/stdlib/email/message.pyi index 6544f8fc2..4e8f600f7 100644 --- a/stdlib/email/message.pyi +++ b/stdlib/email/message.pyi @@ -1,3 +1,4 @@ +from _typeshed import Self from collections.abc import Generator, Iterator, Sequence from email import _ParamsType, _ParamType from email.charset import Charset @@ -55,7 +56,7 @@ class Message: def set_boundary(self, boundary: str) -> None: ... def get_content_charset(self, failobj: _T = ...) -> _T | str: ... def get_charsets(self, failobj: _T = ...) -> _T | list[str]: ... - def walk(self) -> Generator[Message, None, None]: ... + def walk(self: Self) -> Generator[Self, None, None]: ... def get_content_disposition(self) -> str | None: ... def as_string(self, unixfrom: bool = ..., maxheaderlen: int = ..., policy: Policy | None = ...) -> str: ... def as_bytes(self, unixfrom: bool = ..., policy: Policy | None = ...) -> bytes: ...