email stubtest exceptions (#5207)

This commit is contained in:
hatal175
2021-04-11 17:25:48 +03:00
committed by GitHub
parent fc0db5f2b6
commit 472485d80a
12 changed files with 539 additions and 75 deletions

View File

@@ -1,18 +1,18 @@
import email.feedparser
from email.message import Message
from email.policy import Policy
from typing import BinaryIO, Callable, TextIO
from typing import BinaryIO, Callable, Optional, TextIO
FeedParser = email.feedparser.FeedParser
BytesFeedParser = email.feedparser.BytesFeedParser
class Parser:
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
def __init__(self, _class: Optional[Callable[[], Message]] = ..., *, policy: Policy = ...) -> None: ...
def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ...
def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...
class HeaderParser(Parser):
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
def __init__(self, _class: Optional[Callable[[], Message]] = ..., *, policy: Policy = ...) -> None: ...
def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ...
def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...