-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add types to most common tkinter.Entry methods #5586
Conversation
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
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
|
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.
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)
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. |
* most common tkinter.Entry methods * type-ignore tkinter's lsp violation
Perhaps it wasn't too late after all: python/mypy#10621 |
In a bit of a hurry, want to get this done before next mypy release :)