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

Remove default type from option type union #21

Open
Bluenix2 opened this issue Jun 12, 2022 · 0 comments
Open

Remove default type from option type union #21

Bluenix2 opened this issue Jun 12, 2022 · 0 comments
Labels
enhancement Improvement of an existing feature wumpy-interactions

Comments

@Bluenix2
Copy link
Collaborator

Bluenix2 commented Jun 12, 2022

Summary

Currently, determining the type of a Union annotation for a command option does not take into account the fact that the union may contain the type of the default. The library only handles this special case when the union contains None and one other type.

The determine_union() code should be updated to attempt to remove the type of the default then determine the resulting union or type left. This generalizes the special-casing for None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of an existing feature wumpy-interactions
Projects
Status: 📁 - Planning
Development

No branches or pull requests

1 participant