Closed baolsen closed 1 year ago
I agree, while in the other formatters you can use console markup to add special styles for defaults, this is not currently possible with ArgumentDefaultsRichHelpFormatter
. I am not clear how to best handle this yet.
There are multiple options for where this should go:
ArgumentDefaultsRichHelpFormatter
formatter: we need to override its _get_help_string
method_rich_expand_help
methodThere is also the question about what needs to be considered for styling:
"foo bar (default: [argparse.defaults]%(default)s[/argparse.defaults])"
"foo bar[argparse.defaults](default: %(default)s)[argparse.defaults]"
. This may not always work if the user doesn't stick to the (default: %(default)s)
format. I lean toward option 1 here.
Awesome plugin.
When using
formatter_class=ArgumentDefaultsRichHelpFormatter
Currently the default values display fine but it would be nice to pretty-print them if possible. Example of current:
I don't mind attempting a PR for it.