-
-
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
finish types of tkinter.Menu #5583
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
The new None error in primer output would error at runtime if a menu was empty, although in this particular case, it is never empty. |
Porcupine now gives much more "unused type:ignore comment" errors than before, because it has one such comment for every usage of an untyped function. This way we will hopefully get some indication of how much the primer actually tests tkinter changes. |
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.
Nit: Use dict
, tuple
etc. and int | None
etc.
Diff from mypy_primer, showing the effect of this PR on open source code: porcupine (https://github.com/Akuli/porcupine.git)
+ porcupine/menubar.py:80: error: unused "type: ignore" comment
+ porcupine/menubar.py:84: error: unused "type: ignore" comment
+ porcupine/menubar.py:85: error: unused "type: ignore" comment
+ porcupine/menubar.py:114: error: unused "type: ignore" comment
+ porcupine/menubar.py:117: error: unused "type: ignore" comment
+ porcupine/menubar.py:125: error: unused "type: ignore" comment
+ porcupine/menubar.py:150: error: unused "type: ignore" comment
+ porcupine/menubar.py:153: error: unused "type: ignore" comment
+ porcupine/menubar.py:154: error: unused "type: ignore" comment
+ porcupine/menubar.py:155: error: unused "type: ignore" comment
+ porcupine/menubar.py:157: error: unused "type: ignore" comment
+ porcupine/menubar.py:158: error: unused "type: ignore" comment
+ porcupine/menubar.py:165: error: unused "type: ignore" comment
+ porcupine/menubar.py:194: error: Unsupported operand types for + ("None" and "int") [operator]
+ porcupine/menubar.py:194: error: unused "type: ignore" comment
+ porcupine/menubar.py:194: note: Left operand is of type "Optional[int]"
+ porcupine/menubar.py:195: error: unused "type: ignore" comment
|
I already did most of the work in #4903.
This PR will conflict with #5582, but I'll resolve the conflict once one of the PRs gets merged.