argparse icon indicating copy to clipboard operation
argparse copied to clipboard

README.md does not properly describe subcommands

Open gizmomogwai opened this issue 1 year ago • 3 comments

e.g. for me --help does not print the subcommands if I do not Annotate their SumType with @SubCommands. Also the first subsection reads Subcommands without UDA which indices for me, that there is a way to do subcommands without and with uda ... but its kind of the same, just the subcommands are configured with udas ...

gizmomogwai avatar Sep 20 '22 21:09 gizmomogwai

argparse supports two use cases:

  • without UDAs meaning no PositionalArgument, NamedArgument, SubCommands
  • with UDAs meaning that only annotated members are considered

The switch is: if there is at least one member with PositionalArgument, NamedArgument or SubCommands then the second approach is used.

andrey-zherikov avatar Sep 20 '22 22:09 andrey-zherikov

@gizmomogwai any objections if I close this in favor of #78? Both are about mixing *Argument and Sub Commands UDAs

andrey-zherikov avatar Sep 20 '22 23:09 andrey-zherikov

No problem ... please close... I was not sure if this is one or two issues :)

gizmomogwai avatar Sep 21 '22 00:09 gizmomogwai