massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / email / parser.pyi
1 import email.feedparser
2 from email.message import Message
3 from email.policy import Policy
4 from typing import BinaryIO, Callable, TextIO
5
6 FeedParser = email.feedparser.FeedParser
7 BytesFeedParser = email.feedparser.BytesFeedParser
8
9 class Parser:
10     def __init__(self, _class: Callable[[], Message] | None = ..., *, policy: Policy = ...) -> None: ...
11     def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ...
12     def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...
13
14 class HeaderParser(Parser):
15     def __init__(self, _class: Callable[[], Message] | None = ..., *, policy: Policy = ...) -> None: ...
16     def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ...
17     def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...
18
19 class BytesHeaderParser(BytesParser):
20     def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
21     def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ...
22     def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ...
23
24 class BytesParser:
25     def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
26     def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ...
27     def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ...