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 |
Akuli
left a comment
There was a problem hiding this comment.
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 <akuviljanen17@gmail.com>
|
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. |
srittau
left a comment
There was a problem hiding this comment.
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.