mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
BytesGenerator requires BinaryIO (#3106)
This commit is contained in:
committed by
Jelle Zijlstra
parent
1436cfdef9
commit
f5c107cacd
@@ -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 = ...,
|
||||
|
||||
Reference in New Issue
Block a user