Fix type of IO.writelines. (#949)

This lets you use generators to writelines
This commit is contained in:
David Euresti
2017-02-21 14:25:00 -08:00
committed by Łukasz Langa
parent 295788b672
commit 1260d41cd1

View File

@@ -1,7 +1,7 @@
# Stubs for io
from typing import (
List, BinaryIO, TextIO, Iterator, Union, Optional, Callable, Tuple, Any, IO
List, BinaryIO, TextIO, Iterator, Union, Optional, Callable, Tuple, Any, IO, Iterable
)
import builtins
import codecs
@@ -47,7 +47,7 @@ class IOBase:
def tell(self) -> int: ...
def truncate(self, size: Optional[int] = ...) -> int: ...
def writable(self) -> bool: ...
def writelines(self, lines: List[Union[bytes, bytearray]]) -> None: ...
def writelines(self, lines: Iterable[Union[bytes, bytearray]]) -> None: ...
if sys.version_info >= (3, 4):
def readline(self, size: int = ...) -> bytes: ...
def __del__(self) -> None: ...