-
Notifications
You must be signed in to change notification settings - Fork 26
How to support custom types and typing? #41
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
Comments
Looks like a
I would like a short flag
But this works:
|
#24 may help |
You may want to try jsonargparse. It has a very extensive support for complex type hints including |
There is now rudimentary support for type annotations in Clize 5.0.0, but there is still a long way to go for it to be seamless: https://github.com/epsy/clize/blob/v5.0.0/examples/typed_cli.py |
I was trying to figure out from the docs how to support custom types (even
pathlib
'sPath
) as well as python's type hints. Any pointers would be very appreciated.For type hints, it looks like the values after the colon (
:
) are being used by both clize and the typing library. I also want to use the typing library to indicate something is optional to the API, while also have it exposed with clize on the command line. For example:The text was updated successfully, but these errors were encountered: