You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.
First, great tool! I was looking for something exactly like this for a long time and I was happy to find this.
I would like to know: would it be possible to have a different setup for list arguments? Right now, it requires calling the argument as many times as elements in the list (e.g. --my_list 1 --my_list 2 etc) which can be cumbersome for long list or long argument names. Another option would be to use the nargs option. I tested it and it works by modifying a few lines:
At
Let me know if you consider implementing it, otherwise, I'll fork the repository, but I would prefer to stick to this repo if I can since it can be easily installed with pip.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First, great tool! I was looking for something exactly like this for a long time and I was happy to find this.
I would like to know: would it be possible to have a different setup for list arguments? Right now, it requires calling the argument as many times as elements in the list (e.g. --my_list 1 --my_list 2 etc) which can be cumbersome for long list or long argument names. Another option would be to use the nargs option. I tested it and it works by modifying a few lines:
At
pycli/pycli/cli.py
Line 96 in 20fd506
action = _parser.add_argument(name, action=action_name, nargs=nargs)
with nargs set to 1 by default, and to '+' if annotation is iterable, here:
pycli/pycli/cli.py
Line 84 in 20fd506
Let me know if you consider implementing it, otherwise, I'll fork the repository, but I would prefer to stick to this repo if I can since it can be easily installed with pip.
The text was updated successfully, but these errors were encountered: