In https://github.com/python/cpython/pull/23858 the section header for option flags was changed from "optional arguments" to "options" with the rationale that they are not (necessarily) at all optional, while GNU coreutils calls them options. In fact, POSIX calls them options (-o) and option-arguments (-o val) and operands ("positional arguments") so it is indeed a mess, but argparse is not yet perfect. Still, fix the documentation generator for now so that it is compatible with python 3.10 as well. Fixes traceback on building the docs with: ``` [1/4] Generating gen_docs with a custom command FAILED: gen_docs.stamp /home/eschwartz/git/meson/docs/../tools/regenerate_docs.py --output-dir /home/eschwartz/git/meson/docs/builddir --dummy-output-file gen_docs.stamp Traceback (most recent call last): File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 160, in <module> regenerate_docs(output_dir=args.output_dir, File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 146, in regenerate_docs generate_hotdoc_includes(root_dir, output_dir) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 113, in generate_hotdoc_includes cmd_data = get_commands_data(root_dir) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 106, in get_commands_data cmd_data[cmd] = parse_cmd(cmd_output) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 65, in parse_cmd assert arguments_start AssertionError ```pull/9874/head
parent
a0d28e850e
commit
a038fa80f5
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue