Show defaults in --help where appropriate
"glance --help" should include defaults for options where it's meaningful.
It's not meaningful when action='store_true'
, as it will just say "(default: False)", which is silly. It's mostly meaningful when the option takes an argument. So for --outputpath
, it might say "set path to the output directory (default: ./)"
In theory you can use formatter=argparse.ArgumentDefaultsHelpFormatter
, but that will include the silly defaults, like "(default: False)". So you need to specify it on a case-by-case basis.
This work is available as merge request !16 (merged) from branch help-defaults.