Repository navigation
add types to most common tkinter.Entry methods - #5586
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: porcupine (https://github.com/Akuli/porcupine.git)
+ porcupine/plugins/find.py:155: error: unused "type: ignore" comment
+ porcupine/plugins/find.py:158: error: unused "type: ignore" comment
+ porcupine/plugins/find.py:226: error: unused "type: ignore" comment
+ porcupine/plugins/find.py:315: error: unused "type: ignore" comment
+ porcupine/plugins/find.py:335: error: unused "type: ignore" comment
+ porcupine/plugins/pluginmanager.py:71: error: unused "type: ignore" comment
+ porcupine/plugins/pluginmanager.py:73: error: unused "type: ignore" comment
+ porcupine/plugins/pastebin.py:159: error: unused "type: ignore" comment
+ porcupine/plugins/pastebin.py:177: error: unused "type: ignore" comment
|
hauntsaninja
approved these changes
Jun 7, 2021
hauntsaninja
left a comment
Collaborator
There was a problem hiding this comment.
Looks reasonable. scan_mark and scan_dragto return None, and x is an int? (that's what Text uses).
Also you might be too late for mypy release :-( python/mypy#10537 (comment)
Collaborator
Author
|
I didn't do scan_mark and scan_dragto in this PR, because I originally wanted to focus on methods that I have actually seen being used; this ended up being almost every method. I'm merging this now in the hope that it magically ends up in the new mypy, but I'll likely add scan_mark and scan_dragto later. |
This was referenced Jun 10, 2021
Akuli
added a commit
to Akuli/typeshed
that referenced
this pull request
Jun 10, 2021
* most common tkinter.Entry methods * type-ignore tkinter's lsp violation
Collaborator
Author
|
Perhaps it wasn't too late after all: python/mypy#10621 |
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.
In a bit of a hurry, want to get this done before next mypy release :)