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
Fix automatic unwrapping of optional type #9248
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
return x | ||
|
||
args = list(map(unpack_opt, args)) | ||
sig = typer(*args, **kws) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the kwargs need unpacking too?
@karthikkurella @guilhermeleobas @sklam I am moving this back to the state: "Waiting on Author" as an additional comment has been raised by @stuartarchibald |
This pull request is marked as stale as it has had no activity in the past 3 months. Please respond to this comment if you're still interested in working on this. Many thanks! |
Alternative to #9161.
The root problem of optional typed arguments not unpacking is due to lack of exception handling around the
typer
. With the fix, we don't need to specialize individual function to handle optional types.