Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help for *args #119

Closed
anntzer opened this issue Nov 15, 2016 · 1 comment
Closed

help for *args #119

anntzer opened this issue Nov 15, 2016 · 1 comment

Comments

@anntzer
Copy link

anntzer commented Nov 15, 2016

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?

@neithere
Copy link
Owner

neithere commented Feb 8, 2023

I have to admit that using annotations as a way to store help messages was a bad idea in the long run. This functionality is now deprecated in favour of #107.

@neithere neithere closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants