From fe4df128e9cb76cc694494e9b0cd129d4aaa6ebd Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 4 Aug 2024 12:18:47 +0300 Subject: [PATCH] Fix `stubgen --no-analysis/--parse-only` docs (#17632) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The option is called `--inspect-mode`, not `--inspect` It used to be: ``` ยป stubgen --help usage: stubgen [-h] [more options, see -h] [-m MODULE] [-p PACKAGE] [files ...] Generate draft stubs for modules. Stubs are generated in directory ./out, to avoid overriding files with manual changes. This directory is assumed to exist. positional arguments: files generate stubs for given files or directories options: --no-analysis, --parse-only don't perform semantic analysis of sources, just parse them (only applies to Python modules, might affect quality of stubs. Not compatible with --inspect) --inspect-mode import and inspect modules instead of parsing source code.This is the default behavior for c modules and pyc-only packages, but it is also useful for pure python modules with dynamically generated members. ``` --- mypy/stubgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/stubgen.py b/mypy/stubgen.py index 8478bd2135e4..4e6e3efc000b 100755 --- a/mypy/stubgen.py +++ b/mypy/stubgen.py @@ -1772,7 +1772,7 @@ def parse_options(args: list[str]) -> Options: action="store_true", help="don't perform semantic analysis of sources, just parse them " "(only applies to Python modules, might affect quality of stubs. " - "Not compatible with --inspect)", + "Not compatible with --inspect-mode)", ) parser.add_argument( "--inspect-mode",