mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-08 13:05:14 +08:00
Clean up and fix email message types (#13532)
* Unify the `_MessageT` type var in `email._policybase`. * Use explicit type arguments for `Message` type in `_MessageT` type var. In particular, change bound from `Message[str, str]` to `Message[Any, Any]`. * Change `__init__()` overloads of `Parser` and `BytesParser` to accept `Message` objects that are not `Message[str, str]` if `_class` is not also given.
This commit is contained in:
1 parent
a43e0a4c02
commit
0eb44e574c
11 files changed
+42
-25
No files matched your search
@@ -1,5 +1,6 @@
|
||||
from email._policybase import _MessageT
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy, _MessageT
|
||||
from email.policy import Policy
|
||||
|
||||
__all__ = ["MIMEMessage"]
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from collections.abc import Sequence
|
||||
from email import _ParamsType
|
||||
from email._policybase import _MessageT
|
||||
from email.mime.base import MIMEBase
|
||||
from email.policy import Policy, _MessageT
|
||||
from email.policy import Policy
|
||||
|
||||
__all__ = ["MIMEMultipart"]
|
||||
|
||||
|
||||
Reference in new issue
Block a user