mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Fix stab for TextIOBase.detach() and add stab for TextIOWrapper.buffer (#4036)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user