8000 Turn TextIOWrapper(buffer) into a protocol by srittau · Pull Request #11420 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Turn TextIOWrapper(buffer) into a protocol #11420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Feb 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add detach()
  • Loading branch information
srittau committed Feb 14, 2024
commit 7c9d035616f5464c2b0a950fbebd5ba4cc78ccc4
4 changes: 2 additions & 2 deletions stdlib/io.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ class TextIOWrapper(TextIOBase, TextIO): # type: ignore[misc] # incompatible d
write_through: bool = ...,
) -> None: ...
# Equals the "buffer" argument passed in to the constructor.
# TODO: Make TextIOWrapper generic over the buffer argument once
# PEP 696 get accepted.
@property
def buffer(self) -> BinaryIO: ...
@property
Expand All @@ -212,6 +210,8 @@ class TextIOWrapper(TextIOBase, TextIO): # type: ignore[misc] # incompatible d
def writelines(self, __lines: Iterable[str]) -> None: ... # type: ignore[override]
def readline(self, __size: int = -1) -> str: ... # type: ignore[override]
def readlines(self, __hint: int = -1) -> list[str]: ... # type: ignore[override]
# Equals the "buffer" argument passed in to the constructor.
def detach(self) -> BinaryIO: ...
# TextIOWrapper's version of seek only supports a limited subset of
# operations.
def seek(self, __cookie: int, __whence: int = 0) -> int: ...
Expand Down
0