Skip to content

Improve cli help somewhat #19073

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

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from
Draft

Conversation

wyattscarpenter
Copy link
Contributor

This PR rearranges a couple of command line flag categorizations to make more sense and not leave any uncategorized — which is debatable, if someone really liked how the current top of mypy --help is

options:
  --enable-incomplete-feature {InlineTypedDict,PreciseTupleTypes}
                            Enable support of incomplete/experimental features for early preview

Optional arguments:
  -h, --help                Show this help message and exit
  -v, --verbose             More verbose messages
  -V, --version             Show program's version number and exit
  -O FORMAT, --output FORMAT
                            Set a custom output format

Config file:

instead of

Utility arguments:
  -h, --help                Show this help message and exit
  -v, --verbose             More verbose messages
  -V, --version             Show program's version number and exit
  -O FORMAT, --output FORMAT
                            Set a custom output format (choices: {'json'})

Config file:

This PR also removes the --experimental flag (completing a TODO from 2018-03-16) and programmatically enforces the cli help style guide (from which it removes the advice about links that seemed misguided).

This PR relies on #19062 being merged, as I built off of that to save myself time fixing merge conflict later, and so I'm keeping this as a draft PR for now.

wyattscarpenter and others added 30 commits May 11, 2025 14:38
… from being ungrouped

also, take another experimental group from the misc group into this group, and rename the misc group to misc
…re optional

although, arguably, they all provide Utility as well.

wait, was this 'Optional arguments' header supposed to introduce *all* of the arguments, and just has a couple misc ones under it, as a sort of pun? Well, whatever.

This comment has been minimized.

Copy link
Contributor

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

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.

1 participant