Skip to content

Conversation

@wyattscarpenter
Copy link
Contributor

@wyattscarpenter wyattscarpenter commented May 11, 2025

This improves a couple of things relating to the cli help. It changes some verbiage and also invents the Experimental group. Having an experimental group fixes the awkward situation where the --enable-incomplete-feature would just float randomly at the top of the cli help, not in a group. For this Experimental group, I ignored --allow-redefinition-new, because it's better where it is currently, right next to --allow-redefinition.


Old description of PR, no longer relevant, but referenced later in discussion.

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 programmatically enforces the cli help style guide (from which it removes the advice about links that seemed misguided).

This PR builds on #19062, to save time fixing merge conflicts later, and so you should probably merge that first!

This PR has a long history because it used to contain many other changes, but that history can be ignored as I broke most of those changes out into different PRs.

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.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@wyattscarpenter wyattscarpenter marked this pull request as draft September 17, 2025 19:49
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@wyattscarpenter wyattscarpenter changed the title Improve cli help somewhat Improve cli help somewhat, creating an Experimental group Nov 3, 2025
@wyattscarpenter wyattscarpenter marked this pull request as ready for review November 3, 2025 22:56
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

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.

2 participants