Skip to content
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

Merged
merged 4 commits into from
Jun 6, 2021
Merged

finish types of tkinter.Menu #5583

merged 4 commits into from
Jun 6, 2021

Conversation

Akuli
Copy link
Collaborator

@Akuli Akuli commented Jun 6, 2021

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.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@Akuli
Copy link
Collaborator Author

Akuli commented Jun 6, 2021

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.

@Akuli
Copy link
Collaborator Author

Akuli commented Jun 6, 2021

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.

Copy link
Collaborator

@srittau srittau left a 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.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2021

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

@srittau srittau merged commit 6159136 into python:master Jun 6, 2021
@Akuli Akuli deleted the menu branch June 6, 2021 17:53
Akuli added a commit to Akuli/typeshed that referenced this pull request Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants