Closed haydenflinner closed 2 years ago
Hey @haydenflinner thanks for posting this. It seem to me like you're looking for the "add_option_string_dash_variants" argument to ArgumentParser, although, (as mentioned previously in some other issue i'll link here), this adds the alternative option strings where the underscores are replaced with dashes. There isn't yet an option for only using the dash variant.
Hope this helps for now! And by the way, the main thing to look at is the FieldWrapper
, which generates the arg_options
which are then passed to parser.add_argument(**arg_options)
.
Is your feature request related to a problem? Please describe. Two minor things I would like to tweak in the help: 1, I'd like to remove the call-outs to what dataclass is being populated, in favor of these not being exposed. 2, I'd like to display "-"s instead of "_"s, because I don't want my users to think they have to hold shift between letters when typing argument names :smile:
would become
I poked around
help_formatter.py
but it's not obvious to me where this little section with the constructor of the class's signature is coming from. Could probably find by spending time later in a debugger. It is somewhat obvious where the "_"'s in the help come from, and I will check later if it's trivial to add an option to switch these to "-"'s as a user of the lib.Thank you!