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

add types to most common tkinter.Entry methods #5586

Merged
merged 3 commits into from
Jun 7, 2021
Merged

Conversation

Akuli
Copy link
Collaborator

@Akuli Akuli commented Jun 6, 2021

In a bit of a hurry, want to get this done before next mypy release :)

@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@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/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

Copy link
Collaborator

@hauntsaninja hauntsaninja left a 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)

@Akuli
Copy link
Collaborator Author

Akuli commented Jun 7, 2021

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.

@Akuli Akuli merged commit ec80fda into python:master Jun 7, 2021
@Akuli Akuli deleted the entry branch June 7, 2021 08:55
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
@Akuli
Copy link
Collaborator Author

Akuli commented Jun 10, 2021

Perhaps it wasn't too late after all: python/mypy#10621

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