@@ -151,13 +151,15 @@ class Message(Generic[_HeaderT_co, _HeaderParamT_contra]):
151151
152152class MIMEPart (Message [_HeaderRegistryT_co , _HeaderRegistryParamT_contra ]):
153153 def __init__ (self , policy : Policy [Any ] | None = None ) -> None : ...
154- def get_body (self , preferencelist : Sequence [str ] = ("related" , "html" , "plain" )) -> MIMEPart [_HeaderRegistryT_co ] | None : ...
154+ def get_body (
155+ self , preferencelist : Sequence [str ] = ("related" , "html" , "plain" )
156+ ) -> MIMEPart [_HeaderRegistryT_co , _HeaderRegistryParamT_contra ] | None : ...
155157 def attach (self , payload : Self ) -> None : ... # type: ignore[override]
156158 # The attachments are created via type(self) in the attach method. It's theoretically
157159 # possible to sneak other attachment types into a MIMEPart instance, but could cause
158160 # cause unforseen consequences.
159161 def iter_attachments (self ) -> Iterator [Self ]: ...
160- def iter_parts (self ) -> Iterator [MIMEPart [_HeaderRegistryT_co ]]: ...
162+ def iter_parts (self ) -> Iterator [MIMEPart [_HeaderRegistryT_co , _HeaderRegistryParamT_contra ]]: ...
161163 def get_content (self , * args : Any , content_manager : ContentManager | None = None , ** kw : Any ) -> Any : ...
162164 def set_content (self , * args : Any , content_manager : ContentManager | None = None , ** kw : Any ) -> None : ...
163165 def make_related (self , boundary : str | None = None ) -> None : ...
@@ -171,4 +173,4 @@ class MIMEPart(Message[_HeaderRegistryT_co, _HeaderRegistryParamT_contra]):
171173 def as_string (self , unixfrom : bool = False , maxheaderlen : int | None = None , policy : Policy [Any ] | None = None ) -> str : ...
172174 def is_attachment (self ) -> bool : ...
173175
174- class EmailMessage (MIMEPart ): ...
176+ class EmailMessage (MIMEPart [ _HeaderRegistryT_co , _HeaderRegistryParamT_contra ] ): ...
0 commit comments