Skip to content

Make BufferedWriter generic over a protocol #14015

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented May 11, 2025

No description provided.

@srittau
Copy link
Collaborator Author

srittau commented May 11, 2025

Closes: #13495.

@srittau srittau linked an issue May 11, 2025 that may be closed by this pull request

This comment has been minimized.

@srittau srittau closed this May 11, 2025
@srittau srittau reopened this May 11, 2025
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

ibis (https://github.com/ibis-project/ibis)
- ibis/expr/visualize.py:182: error: Incompatible types in assignment (expression has type "BufferedWriter", variable has type "_TemporaryFileWrapper[bytes]")  [assignment]
+ ibis/expr/visualize.py:182: error: Incompatible types in assignment (expression has type "BufferedWriter[_BufferedWriterStream]", variable has type "_TemporaryFileWrapper[bytes]")  [assignment]

@srittau srittau marked this pull request as ready for review May 11, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BufferedRWPair annotations
1 participant