Add overrides for the methods 'readlines' and 'writelines' in TextIOBase. (#2551)

Without the overrides, MRO will pick the methods in IOBase which have
the wrong signatures.
This commit is contained in:
Siva Chandra
2018-10-30 14:44:18 -07:00
committed by Sebastian Rittau
parent 13e84dc004
commit 701f970c6f

View File

@@ -141,7 +141,9 @@ class TextIOBase(IOBase):
def __next__(self) -> str: ... # type: ignore
def detach(self) -> IOBase: ...
def write(self, s: str) -> int: ...
def writelines(self, lines: List[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: ...
def seek(self, offset: int, whence: int = ...) -> int: ...
def tell(self) -> int: ...