Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix incomplete tkinter.commondialog stub #14340

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

Merged
merged 4 commits into from
Jun 26, 2025

Conversation

MarcellPerger1
Copy link
Contributor

Fixed incomplete tkinter.commondialog stub.

This comment has been minimized.

def __init__(self, master=None, **options) -> None: ...
def show(self, **options): ...
master: Misc | None
options: Mapping[str, Any]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now recommend adding a comment for each use of Any. For example:

Suggested change
options: Mapping[str, Any]
# Types of options are very dynamic. They depend on the command and are
# sometimes changed to a different type.
options: Mapping[str, Any]

IMO adding just one comment like this is enough for the whole file, since all Any uses are for things named options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now recommend adding a comment for each use of Any

Separate issue, but it might be worth mentioning this in the CONTRIBUTING.md file or somewhere more visible (or is there already some place with a collection of recommendations like this that I'm just missing?)

Copy link
Member

@brianschubert brianschubert Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be worth mentioning this in the CONTRIBUTING.md file

Hmm, there was a mention, but it was removed as part of #13332. It might make sense to re-add it and perhaps other parts that were more about typeshed policy than style

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@Akuli Akuli merged commit 47cfbee into python:main Jun 26, 2025
64 checks passed
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.

3 participants