mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Reduce code duplication in the email module (#7558)
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import email.feedparser
|
||||
from email import _MessageT
|
||||
from email.message import Message
|
||||
from email.policy import Policy
|
||||
from typing import BinaryIO, Callable, TextIO, TypeVar
|
||||
from typing import BinaryIO, Callable, TextIO
|
||||
|
||||
__all__ = ["Parser", "HeaderParser", "BytesParser", "BytesHeaderParser", "FeedParser", "BytesFeedParser"]
|
||||
|
||||
_M = TypeVar("_M", bound=Message)
|
||||
|
||||
FeedParser = email.feedparser.FeedParser[_M]
|
||||
BytesFeedParser = email.feedparser.BytesFeedParser[_M]
|
||||
FeedParser = email.feedparser.FeedParser[_MessageT]
|
||||
BytesFeedParser = email.feedparser.BytesFeedParser[_MessageT]
|
||||
|
||||
class Parser:
|
||||
def __init__(self, _class: Callable[[], Message] | None = ..., *, policy: Policy = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user