Fix stab for TextIOBase.detach() and add stab for TextIOWrapper.buffer (#4036)

This commit is contained in:
Serhiy Storchaka
2020-05-19 19:43:32 +03:00
committed by GitHub
parent de4d43612b
commit 9902348c34

View File

@@ -145,7 +145,7 @@ class TextIOBase(IOBase):
newlines: Union[str, Tuple[str, ...], None]
def __iter__(self) -> Iterator[str]: ... # type: ignore
def __next__(self) -> str: ... # type: ignore
def detach(self) -> IOBase: ...
def detach(self) -> BinaryIO: ...
def write(self, s: str) -> int: ...
def writelines(self, __lines: List[str]) -> None: ... # type: ignore
def readline(self, size: int = ...) -> str: ... # type: ignore
@@ -164,13 +164,15 @@ class TextIOWrapper(TextIO):
# -> None: ...
def __init__(
self,
buffer: IO[bytes],
buffer: BinaryIO,
encoding: Optional[str] = ...,
errors: Optional[str] = ...,
newline: Optional[str] = ...,
line_buffering: bool = ...,
write_through: bool = ...
) -> None: ...
@property
def buffer(self) -> BinaryIO: ...
if sys.version_info >= (3, 7):
def reconfigure(
self,
@@ -205,7 +207,7 @@ class TextIOWrapper(TextIO):
def __iter__(self) -> Iterator[str]: ...
def __next__(self) -> str: ...
def __enter__(self) -> TextIO: ...
def detach(self) -> IOBase: ...
def detach(self) -> BinaryIO: ...
def write(self, __text: str) -> int: ...
def readline(self, __size: int = ...) -> str: ...
def read(self, __size: Optional[int] = ...) -> str: ...