diff --git a/stdlib/3/email/parser.pyi b/stdlib/3/email/parser.pyi index 884e6de9c19e..180e382ee8e4 100644 --- a/stdlib/3/email/parser.pyi +++ b/stdlib/3/email/parser.pyi @@ -2,8 +2,8 @@ import email.feedparser from email.message import Message -from typing import Callable, Optional, TextIO, BinaryIO from email.policy import Policy +from typing import BinaryIO, Callable, Optional, TextIO FeedParser = email.feedparser.FeedParser BytesFeedParser = email.feedparser.BytesFeedParser @@ -24,10 +24,10 @@ class BytesHeaderParser(BytesParser): def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ... def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ... - def parsestr(self, text: str, headersonly: bool = ...) -> Message: ... + def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ... class BytesParser: def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ... def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ... - def parsestr(self, text: str, headersonly: bool = ...) -> Message: ... + def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ...