2
2
3
3
import email .feedparser
4
4
from email .message import Message
5
- from typing import Callable , Optional , TextIO , BinaryIO
6
5
from email .policy import Policy
6
+ from typing import BinaryIO , Callable , Optional , TextIO
7
7
8
8
FeedParser = email .feedparser .FeedParser
9
9
BytesFeedParser = email .feedparser .BytesFeedParser
@@ -24,10 +24,10 @@ class BytesHeaderParser(BytesParser):
24
24
def __init__ (self , _class : Callable [[], Message ] = ..., * ,
25
25
policy : Policy = ...) -> None : ...
26
26
def parse (self , fp : BinaryIO , headersonly : bool = ...) -> Message : ...
27
- def parsestr (self , text : str , headersonly : bool = ...) -> Message : ...
27
+ def parsebytes (self , text : bytes , headersonly : bool = ...) -> Message : ...
28
28
29
29
class BytesParser :
30
30
def __init__ (self , _class : Callable [[], Message ] = ..., * ,
31
31
policy : Policy = ...) -> None : ...
32
32
def parse (self , fp : BinaryIO , headersonly : bool = ...) -> Message : ...
33
- def parsestr (self , text : str , headersonly : bool = ...) -> Message : ...
33
+ def parsebytes (self , text : bytes , headersonly : bool = ...) -> Message : ...
0 commit comments