Skip to content

Commit 228f74d

Browse files
authored
io: loosen writelines type to iterable (#4642)
This came up in python/mypy#9275 Co-authored-by: hauntsaninja <>
1 parent 8a8ed35 commit 228f74d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/3/io.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class TextIOBase(IOBase):
128128
def __next__(self) -> str: ... # type: ignore
129129
def detach(self) -> BinaryIO: ...
130130
def write(self, __s: str) -> int: ...
131-
def writelines(self, __lines: List[str]) -> None: ... # type: ignore
131+
def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore
132132
def readline(self, __size: int = ...) -> str: ... # type: ignore
133133
def readlines(self, __hint: int = ...) -> List[str]: ... # type: ignore
134134
def read(self, __size: Optional[int] = ...) -> str: ...
@@ -166,7 +166,7 @@ class TextIOWrapper(TextIOBase, TextIO):
166166
def __enter__(self: _T) -> _T: ...
167167
def __iter__(self) -> Iterator[str]: ... # type: ignore
168168
def __next__(self) -> str: ... # type: ignore
169-
def writelines(self, __lines: List[str]) -> None: ... # type: ignore
169+
def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore
170170
def readline(self, __size: int = ...) -> str: ... # type: ignore
171171
def readlines(self, __hint: int = ...) -> List[str]: ... # type: ignore
172172
def seek(self, __cookie: int, __whence: int = ...) -> int: ...

0 commit comments

Comments
 (0)