-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update tkinter.Misc for 3.13
#12367
Update tkinter.Misc for 3.13
#12367
Conversation
|
CC: @Akuli |
This comment has been minimized.
This comment has been minimized.
| # Supports options from `_BusyInfo`` | ||
| def tk_busy_cget(self, option: Literal["cursor"]) -> _Cursor: ... | ||
| busy_cget = tk_busy_cget | ||
| def tk_busy_configure(self, cnf: Any = None, **kw: Any) -> Any: ... |
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.
You can overload this similarly to other configure methods to get rid of **kw: Any. Look at Tk.configure for a relatively simple example.
After writing the types for those other configure methods, I have realized that there are better ways to do it, but that's beyond the scope of this PR and it's fine to go with the existing pattern. By far the most common use case is passing keyword arguments and ignoring the return value, e.g. widget.busy_config(cursor="hand2") in this case.
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Add new methods on
tkinter.Miscfor 3.13.