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

Return-type for cli.Application.main crashes app #342

Closed
asmfreak opened this issue Aug 28, 2017 · 0 comments · Fixed by #343
Closed

Return-type for cli.Application.main crashes app #342

asmfreak opened this issue Aug 28, 2017 · 0 comments · Fixed by #343

Comments

@asmfreak
Copy link
Contributor

Traceback (most recent call last):
   File "gummy.py", line 12, in <module>
     GummyConsumer.run()
   File "plumbum/cli/application.py", line 480, in run
     ordered, tailargs = inst._validate_args(swfuncs, tailargs)
   File "plumbum/cli/application.py", line 431, in _validate_args
     positional[args_names.index(item)] = m.annotations[item]
 ValueError: 'return' is not in list

This traceback is triggered if main() of cli.Application has a typed return i.e.:

 class GummyConsumer(cli.Application):
     def main(self, bear: GummyBear) -> None:
         print('MUNCH MUNCH MUNCH')

This should be sorted out somehow for #334 for full typing information. Forked this from #336 to be more precise.

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

Successfully merging a pull request may close this issue.

1 participant