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

Skip to content

Re-add documentation for formatting mypy --help text #19063

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 5 commits into from
May 10, 2025

Conversation

wyattscarpenter
Copy link
Contributor

@wyattscarpenter wyattscarpenter commented May 9, 2025

Fixes #15555

This re-adds some rather-innocuous documentation to main about how to write command line flag descriptions, which were on a wiki page that was subsequently destroyed (rendering the link in the comment dead).

@wyattscarpenter wyattscarpenter changed the title Docs Re-add documentation for formatting mypy --help text May 9, 2025
Copy link
Contributor

github-actions bot commented May 9, 2025

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

# Tip: try substituting the group title and description into the following sentence:
# > {group_title}: these flags will {group_description}
# Feel free to add subsequent sentences that add additional details.
# 3. If you cannot think of a meaningful description for a new group, omit it entirely.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This reads like "feel free to add a group even if it doesn't convey any semantic meaning" which isn't a good advice IMO. Was it intended? Groups are, khm, groups, they are supposed to wrap several settings that have something in common, and that "something" should be easy to describe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no particular opinion. I suppose this is advice for group for which the programmer cannot think of further description beyond the name.

Never been a problem for me, but I suppose if someone is having trouble it's better to instruct them that the default should be nothing rather than something unhelpful.

@sterliakov
Copy link
Collaborator

LG! English isn't my first language so I won't leave an explicit approval for a documentation PR. Let's wait for a native speaker (or someone more confident in their language!) to double-check.

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.

Thanks! I think this is good, we can iterate on the advice if we find folks are adding lots of groups. These days mypy is more error code first rather than flag first anyway

@hauntsaninja hauntsaninja merged commit 18a6695 into python:master May 10, 2025
18 checks passed
@wyattscarpenter wyattscarpenter deleted the docs branch May 11, 2025 12:08
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.

Missing documentation for formatting mypy --help text
3 participants