Skip to content

Commit f362cf4

Browse files
jleclancheJelleZijlstra
authored andcommitted
Fix email.parser.BytesParser and BytesHeaderParser method args (#2548)
Fixes #2502
1 parent 680d69b commit f362cf4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/3/email/parser.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import email.feedparser
44
from email.message import Message
5-
from typing import Callable, Optional, TextIO, BinaryIO
65
from email.policy import Policy
6+
from typing import BinaryIO, Callable, Optional, TextIO
77

88
FeedParser = email.feedparser.FeedParser
99
BytesFeedParser = email.feedparser.BytesFeedParser
@@ -24,10 +24,10 @@ class BytesHeaderParser(BytesParser):
2424
def __init__(self, _class: Callable[[], Message] = ..., *,
2525
policy: Policy = ...) -> None: ...
2626
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: ...
2828

2929
class BytesParser:
3030
def __init__(self, _class: Callable[[], Message] = ..., *,
3131
policy: Policy = ...) -> None: ...
3232
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

Comments
 (0)