Ignore a few override errors in typeshed#19079
Merged
Conversation
I was seeing errors like these in our Bazel-based mypy configuration, which may type check typeshed in some non-standard way: ``` mypy/typeshed/stdlib/tempfile.pyi:390: error: Argument 1 of "writelines" is incompatible with supertype "_IOBase"; supertype defines the argument type as "Iterable[Buffer]" [override] mypy/typeshed/stdlib/tempfile.pyi:390: note: This violates the Liskov substitution principle mypy/typeshed/stdlib/tempfile.pyi:390: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides mypy/typeshed/stdlib/tkinter/ttk.pyi:565: error: Signature of "forget" incompatible with supertype "Pack" [override] mypy/typeshed/stdlib/tkinter/ttk.pyi:565: note: Superclass: mypy/typeshed/stdlib/tkinter/ttk.pyi:565: note: def pack_forget(self) -> None mypy/typeshed/stdlib/tkinter/ttk.pyi:565: note: Subclass: mypy/typeshed/stdlib/tkinter/ttk.pyi:565: note: def forget(self, tab_id: Any) -> None ``` I'm just merging this directly to the mypy repo so that I can move forward more quickly, as this is needed to unblock the public release.
svalentin
8000
approved these changes
May 12, 2025
Contributor
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Member
|
This is going to cause issues with the next automatic mypy sync. We could add another patch to the sync workflow but that will make future maintenance harder. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was seeing errors like these in our Bazel-based mypy configuration, which may type check typeshed in some non-standard way:
I'm just merging this directly to the mypy repo so that I can move forward more quickly, as this is needed to unblock the public release.