BytesGenerator requires BinaryIO (#3106)

This commit is contained in:
Cole Maclean
2019-07-07 22:03:07 -07:00
committed by Jelle Zijlstra
parent 1436cfdef9
commit f5c107cacd

View File

@@ -1,6 +1,6 @@
# Stubs for email.generator (Python 3.4)
from typing import TextIO, Optional
from typing import BinaryIO, TextIO, Optional
from email.message import Message
from email.policy import Policy
@@ -14,9 +14,9 @@ class Generator:
linesep: Optional[str] = ...) -> None: ...
class BytesGenerator:
def clone(self, fp: TextIO) -> Generator: ...
def clone(self, fp: BinaryIO) -> BytesGenerator: ...
def write(self, s: str) -> None: ...
def __init__(self, outfp: TextIO, mangle_from_: bool = ...,
def __init__(self, outfp: BinaryIO, mangle_from_: bool = ...,
maxheaderlen: int = ..., *,
policy: Policy = ...) -> None: ...
def flatten(self, msg: Message, unixfrom: bool = ...,