-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Conversation
Fwiw the command line flag conventions at https://github.com/python/mypy/wiki/Documentation-Conventions/b030b2190b84a64928cc8671d23ce199452c5694 look innocuous, feel free to inline them directly into the code
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. |
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.
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.
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.
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.
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. |
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! 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
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).