Skip to content

Adjust output of --help text to mirror command line changes - #5334

Merged
Michael0x2a merged 3 commits into
python:masterfrom
Michael0x2a:adjust-help-text
Aug 4, 2018
Merged

Michael0x2a merged 3 commits into
python:masterfrom
Michael0x2a:adjust-help-text

Conversation

@Michael0x2a

Copy link
Copy Markdown
Collaborator

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.

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.
@Michael0x2a

Copy link
Copy Markdown
Collaborator Author

For reference, the new output: https://gist.github.com/Michael0x2a/0bdefea47267b59dd7d3810088f88669

Note that it links to a page introduced in #5333.

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

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.

Comment thread mypy/main.py Outdated


HEADER = """%(prog)s [-h] [-v] [-V] [more options; see below]
[-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files [files ...]]"""

Copy link
Copy Markdown
Member

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 ...].

@Michael0x2a

Copy link
Copy Markdown
Collaborator Author

@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 usage: and partly because it seemed like it went against argparse's conventions.

Anyways, I'll make the fixes you suggested later tonight.

@Michael0x2a

Copy link
Copy Markdown
Collaborator Author

@gvanrossum -- this is ready for another look. The new help text looks like this:

https://gist.github.com/Michael0x2a/7220f9a088aac51bbe13f9078d521793

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Love it!

@Michael0x2a
Michael0x2a merged commit ee7b511 into python:master Aug 4, 2018
@Michael0x2a
Michael0x2a deleted the adjust-help-text branch August 4, 2018 22:47
@Michael0x2a Michael0x2a mentioned this pull request Sep 16, 2018
9 of 12 tasks
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.

2 participants