From 407a1aee57bbd896b737d470c15717c6d0d53532 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Fri, 9 Oct 2020 20:22:08 -0700 Subject: [PATCH] io: loosen writelines type to iterable This came up in https://github.com/python/mypy/pull/9275 --- stdlib/3/io.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/3/io.pyi b/stdlib/3/io.pyi index 206f9345e4bd..f904e976a101 100644 --- a/stdlib/3/io.pyi +++ b/stdlib/3/io.pyi @@ -128,7 +128,7 @@ class TextIOBase(IOBase): def __next__(self) -> str: ... # type: ignore def detach(self) -> BinaryIO: ... def write(self, __s: str) -> int: ... - def writelines(self, __lines: List[str]) -> None: ... # type: ignore + def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore def readline(self, __size: int = ...) -> str: ... # type: ignore def readlines(self, __hint: int = ...) -> List[str]: ... # type: ignore def read(self, __size: Optional[int] = ...) -> str: ... @@ -166,7 +166,7 @@ class TextIOWrapper(TextIOBase, TextIO): def __enter__(self: _T) -> _T: ... def __iter__(self) -> Iterator[str]: ... # type: ignore def __next__(self) -> str: ... # type: ignore - def writelines(self, __lines: List[str]) -> None: ... # type: ignore + def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore def readline(self, __size: int = ...) -> str: ... # type: ignore def readlines(self, __hint: int = ...) -> List[str]: ... # type: ignore def seek(self, __cookie: int, __whence: int = ...) -> int: ...