mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
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:
committed by
Sebastian Rittau
parent
13e84dc004
commit
701f970c6f
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user