-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Automatically add Optional type to kwargs with None default #30
Comments
Automatically adding |
Wasn't aware about this. I understand. |
I think that maybe we just add the implicit optional in jsonargparse without any option. Anyway mypy will show people the error when this is no longer a valid type. The ithe implicit optional code in jsonargparse would not be used, but at least it doesn't hurt. |
Sounds good. |
This is now implemented. Please check. |
This is now in release v3.2.0. |
Thanks! I'll have a look soon |
I was having a look a this PR and decided to give it a try.
Then execute
python parsing_workout.py --print_config > conf.yml python parsing_workout.py --config conf.yml
I get the following error :
Notably, this doesn't crash with IPython.
I think it would make sense to automatically add
Optional
to the type in those cases, WDYT?The text was updated successfully, but these errors were encountered: