-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Update io.pyi #4912
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
Update io.pyi #4912
Conversation
See corresponding [issue](#4906 (comment)).
Diff from mypy_primer, showing the effect of this PR on open source code: werkzeug (https://github.com/pallets/werkzeug.git)
+ src/werkzeug/wsgi.py:962: error: Signature of "read" incompatible with supertype "IOBase"
rich (https://github.com/willmcgugan/rich.git)
+ rich/file_proxy.py:28: error: Signature of "write" incompatible with supertype "IOBase"
pytest (https://github.com/pytest-dev/pytest.git)
+ src/_pytest/capture.py:208: error: Signature of "write" incompatible with supertype "IOBase" [override]
|
Maybe this is related: python/mypy#5876 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix the mypy_primer errors. I tried doing what werkzeug does, but I didn't check if other errors get fixed with this.
@Akuli , thanks for help. Useful link and commit, hope it will help. ps |
Co-authored-by: Akuli <[email protected]>
Diff from mypy_primer, showing the effect of this PR on open source code: rich (https://github.com/willmcgugan/rich.git)
+ rich/file_proxy.py:28: error: Signature of "write" incompatible with supertype "IOBase"
pytest (https://github.com/pytest-dev/pytest.git)
+ src/_pytest/capture.py:208: error: Signature of "write" incompatible with supertype "IOBase" [override]
|
Don't know if mypy_primer is showing outdated results above |
@Akuli , so what can you suggest? |
I would try making an empty commit to rerun mypy_primer. Don't know if there's a better way. |
Restart checks
@Akuli , very nice, according to mypy_primer no diffs have been found. So what is needed next to merge this PR and close #4906 ? |
A typeshed collaborator (not me, I'm just a contributor) has to review this, and if it looks good to the collaborator, they will likely merge it and close the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change seems correct to me and the best solution. I am still a bit wary that this might cause unforeseen problems, but the mypy_primer output makes me optimistic. Let's try this an be prepared to revert if it causes problems.
See corresponding issue.