-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
create _tkinter stub #4372
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
create _tkinter stub #4372
Conversation
How do I tell stubtest that an attribute comes from a |
stubtest is okay with attributes generally, because those are often defined on instances, so it can't get at them without instantiating. It does assume methods are not dynamically created though. Really appreciate all your improvements! |
ready for review |
How about putting the methods to a class named |
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.
Sorry for the delay and thank you for the much needed improvements to Tcl/Tk! Looks mostly good to me, with one nit below.
But on a general note: Stubs should only contain brief stub-related comments. Further documentation is out of scope for stubs and should be part of the documentation and/or implementation. If you want to document how you determined a certain type or possible problems for the reviewer to look out for, the best way to do that is with inline comments in the PR.
stdlib/3/_tkinter.pyi
Outdated
|
||
# These come from dir(_tkinter). I don't know when actually using any of this | ||
# would be convenient | ||
ALL_EVENTS: int = ... |
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 (also applies to assignments below): = ...
is redundant and should be left out.
I made the comments more concise. I can see how to apply these commenting guidelines to some of my comments in #4363, for example, and I will change that PR appropriately next. But sometimes I really want people working on the stubs to see something, even if they're adding something new rather than modifying something that I wrote. Can I still use comments for that? Edit: nevermind, I think I understood this now |
checks a checkbox in #1019
I thought I'd do some smaller tkinter PRs because #4363 doesn't seem to be getting merged in a while (needs conversation)