meson/tools
Eli Schwartz a038fa80f5
docs: fix command help regenerator on python 3.10
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
```
2022-01-25 01:47:39 -05:00
..
ac_converter.py fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00
boost_names.py fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00
build_website.py remove unused imports 2021-10-26 20:53:43 -04:00
cmake2meson.py fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00
copy_files.py editorconfig: add setting to trim trailing whitespace 2021-08-15 09:36:18 -04:00
dircondenser.py Fix files in the unittests subdir. 2022-01-02 19:07:36 +02:00
regenerate_docs.py docs: fix command help regenerator on python 3.10 2022-01-25 01:47:39 -05:00
run_with_cov.py fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00