From f362cf47fa8e6c34c12ae275e22cae6215ebec27 Mon Sep 17 00:00:00 2001 From: Jerome Leclanche Date: Wed, 24 Oct 2018 16:22:08 +0300 Subject: [PATCH] Fix email.parser.BytesParser and BytesHeaderParser method args (#2548) Fixes #2502 --- stdlib/3/email/parser.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/3/email/parser.pyi b/stdlib/3/email/parser.pyi index 884e6de9c..180e382ee 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: ...