We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 132ae01 commit b9d8a1aCopy full SHA for b9d8a1a
1 file changed
stdlib/email/iterators.pyi
@@ -1,11 +1,14 @@
1
from _typeshed import SupportsWrite
2
from collections.abc import Iterator
3
from email.message import Message
4
+from typing import TypeVar
5
+
6
+_T = TypeVar("_T", bound=Message)
7
8
__all__ = ["body_line_iterator", "typed_subpart_iterator", "walk"]
9
10
def body_line_iterator(msg: Message, decode: bool = False) -> Iterator[str]: ...
-def typed_subpart_iterator(msg: Message, maintype: str = "text", subtype: str | None = None) -> Iterator[str]: ...
11
+def typed_subpart_iterator(msg: _T, maintype: str = "text", subtype: str | None = None) -> Iterator[_T]: ...
12
def walk(self: Message) -> Iterator[Message]: ...
13
14
# We include the seemingly private function because it is documented in the stdlib documentation.
0 commit comments