-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Improve type annotations for ttk.Widget
#15189
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
base: main
Are you sure you want to change the base?
Improve type annotations for ttk.Widget
#15189
Conversation
This comment has been minimized.
This comment has been minimized.
Akuli
left a 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.
Thanks for working on this!
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Akuli
left a 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.
Just one tweak. As usual, tkinter is more difficult than you would expect :)
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This PR improves annotations for
ttk.WidgetChanges.
widgetname(str | None) andkw(dictwithstrkey) in constructorWidget.instateWidget.state, makingstatespecparameter accept a sequence orNoneTypeand return tuple of state stringsSuggestions
With
Tas aTypeVarcallbackinWidget.instateshould beCallable[..., T]bool | T