]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Pass the list of choices to argparse.Action 671/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 5 Mar 2021 12:06:12 +0000 (13:06 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 5 Mar 2021 12:44:15 +0000 (13:44 +0100)
commit24eeda6e228cf9a079a4eca36673b2f83193bd22
tree4936dc84bb40c3cc3063b80262b0eadb805a2e8b
parent66604c3fef4702a62a6bb7a72e81fde3764e6adf
Pass the list of choices to argparse.Action

This way our custom ListAction action can properly generate a list of
choices in the help message when the metavar is not defined:

Before:
$ mkosi --help
...
  --debug SELECTOR      Turn on debugging output

After:
$ mkosi --help
...
  --debug {run,build-script,workspace-command}
                          Turn on debugging output
mkosi/__init__.py