argh icon indicating copy to clipboard operation
argh copied to clipboard

help for *args

Open anntzer opened this issue 9 years ago • 0 comments

Currently, help (from annotation) for *args is not displayed:

def main(arg: "help", *other_args: "more help"):
    pass

if __name__ == "__main__":
    import argh
    argh.dispatch_command(main)
$ python /tmp/foo.py -h
usage: foo.py [-h] arg [other_args [other_args ...]]

positional arguments:
  arg         help
  other_args  -

optional arguments:
  -h, --help  show this help message and exit

I think argparse should be able to handle help for such arguments just fine?

anntzer avatar Nov 15 '16 22:11 anntzer