bw2 / ConfigArgParse

A drop-in replacement for argparse that allows options to also be set via config files and/or environment variables.
MIT License
728 stars 121 forks source link

Is it possible to show default values of parameter like argparse does? #244

Closed stastnypremysl closed 3 years ago

stastnypremysl commented 3 years ago

Hello.

Is it possible to automatically print default values of optional parameters to help please?

Thanks. Přemysl

bw2 commented 3 years ago

Have you tried setting formatter_class=argparse.ArgumentDefaultsHelpFormatter ? eg. configargparse.ArgumentParser(formatter_class=configargparse.ArgumentDefaultsHelpFormatter)