Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

wyattscarpenter
Copy link
Contributor

@wyattscarpenter wyattscarpenter commented May 11, 2025

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!

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.

This comment has been minimized.

@wyattscarpenter wyattscarpenter marked this pull request as ready for review July 31, 2025 08:05
@hauntsaninja
Copy link
Collaborator

I merged #19062 as instructed, this now has merge conflicts as anticipated :-)

@wyattscarpenter
Copy link
Contributor Author

Hmm, that's actually the opposite of what I expected, but I guess there are just a couple places where these two had diverged...

@wyattscarpenter
Copy link
Contributor Author

Well, the new merge conflicts were pretty easy to merge, as expected, at least... 😌

I was so real for this...

This comment has been minimized.

Copy link
Contributor Author

@wyattscarpenter wyattscarpenter left a comment

Choose a reason for hiding this comment

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

It seems I accidentally double-included strict_list.rst at some point in this process.

This comment has been minimized.

@wyattscarpenter
Copy link
Contributor Author

wyattscarpenter commented Sep 11, 2025

Notes to self:

  • While this PR could be merged as-is (unless subsequent other commits have invalidated it (which will inevitably happen eventually)), I'm going to try to split parts of it off for the ease of reviewers, since it can be chunked naturally like that, and very small PRs are trivial to accept in a way that bigger PRs aren't. I may edit this comment later to record things I took out of OP and put into a different PR.
  • I presume that reorganizing the documentation like I did makes it flow in a logical/corresponding order, but this makes the diff much harder to examine (since there are a couple of non-moving changes in the moved section as well, and they all just render as plus or minus lines). That will be a priority to break up into multiple steps (viz: not re-order it here). Another priority for splitting is removing the --experimental flag, which is probably best done as its own PR anyway. I'm also thinking the rename of the misc group variable can be a freestanding PR, as can the invention of the experimental group.
  • With the release of 1.18, there is probably a new experimental option related to Fixed‑Format Cache, and possibly one related to --allow-redefinition-new. And I should collect those into the right new sections that I am inventing, unless they fit better in their own sections. d33c147, fd05265

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
-   File "/tmp/mypy_primer/mypy_old/venv/bin/mypy", line 7, in <module>
+   File "/tmp/mypy_primer/mypy_new/venv/bin/mypy", line 7, in <module>
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/__main__.py", line 15, in console_entry
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/__main__.py", line 15, in console_entry
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/main.py", line 127, in main
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/main.py", line 127, in main
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/main.py", line 211, in run_build
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/main.py", line 211, in run_build
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 196, in build
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 196, in build
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 272, in _build
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 272, in _build
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 2946, in dispatch
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 2946, in dispatch
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 3346, in process_graph
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 3346, in process_graph
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 3475, in process_stale_scc
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 3475, in process_stale_scc
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 2493, in write_cache
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 2493, in write_cache
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/cache.py", line 28, in __init__
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/cache.py", line 28, in __init__

AutoSplit (https://github.com/Toufool/AutoSplit)
-   File "/tmp/mypy_primer/mypy_old/venv/bin/mypy", line 7, in <module>
+   File "/tmp/mypy_primer/mypy_new/venv/bin/mypy", line 7, in <module>
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/__main__.py", line 15, in console_entry
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/__main__.py", line 15, in console_entry
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/main.py", line 127, in main
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/main.py", line 127, in main
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/main.py", line 211, in run_build
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/main.py", line 211, in run_build
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 196, in build
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 196, in build
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 272, in _build
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 272, in _build
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 2946, in dispatch
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 2946, in dispatch
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 3346, in process_graph
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 3346, in process_graph
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 3475, in process_stale_scc
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 3475, in process_stale_scc
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 2493, in write_cache
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 2493, in write_cache
-   File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/cache.py", line 28, in __init__
+   File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/cache.py", line 28, in __init__

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