mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Fix type of IO.writelines. (#949)
This lets you use generators to writelines
This commit is contained in:
committed by
Łukasz Langa
parent
295788b672
commit
1260d41cd1
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user