-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Adjust output of --help text to mirror command line changes #5334
Conversation
This commit adjusts the output of running `mypy --help` to mirror the changes made in python#5333. Specifically, it rearranges the order of the flags slightly and replaces the summary of the flags at the top with a short description of how to use mypy along with links for learning more.
For reference, the new output: https://gist.github.com/Michael0x2a/0bdefea47267b59dd7d3810088f88669 Note that it links to a page introduced in #5333. |
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.
Why not capitalize the first word of every section title? Currently the sections start with lower case words, and they all look funny to me, because they have subtitles that are capitalized. I realize we can't fix that for "usage:" itself, but all the others we control... (Also several of the sections have a section title that's almost the same as the subtitle -- since these always seem to appear together it would be nice if there was less redundancy there.)
While I'm on a capitalization rant, the individual help messages should probably also all be made to start with a capital letter (but not end with a period).
Otherwise LG -- I think the full list of flags has gotten too unwieldy.
mypy/main.py
Outdated
@@ -297,6 +294,37 @@ def infer_python_version_and_executable(options: Options, | |||
options.python_executable = special_opts.python_executable | |||
|
|||
|
|||
HEADER = """%(prog)s [-h] [-v] [-V] [more options; see below] | |||
[-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files [files ...]]""" |
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.
Isn't [[files [files ...]]
redundant? I'd just say [files ...]
.
@gvanrossum -- I 100% agree with your comments regarding capitalization -- I was about to do it the way you suggested back when I made my first wave of command line improvements, but reluctantly gave up partly because of things like Anyways, I'll make the fixes you suggested later tonight. |
@gvanrossum -- this is ready for another look. The new help text looks like this: https://gist.github.com/Michael0x2a/7220f9a088aac51bbe13f9078d521793 |
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.
Love it!
This commit adjusts the output of running
mypy --help
to mirror the changes made in #5333.Specifically, it rearranges the order of the flags slightly and replaces the summary of the flags at the top with a short description of how to use mypy along with links for learning more.