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

Annotated flattening #165

Closed
DanCardin opened this issue Nov 5, 2024 Discussed in #164 · 1 comment
Closed

Annotated flattening #165

DanCardin opened this issue Nov 5, 2024 Discussed in #164 · 1 comment

Comments

@DanCardin
Copy link
Owner

Discussed in #164

It should be possible to flatten the internal annotated calls (either here or in type_lens) such that Annotated[Subcommands[T] | None, ...] is identical to Annotated[T | None, Subcommand()], which it should already be given the native flattening and the fact that Subcommands is already an Annotated under the hood.

@DanCardin
Copy link
Owner Author

Actually, I think maybe this is a wontfix (at least for now anyways). Subcommands[T | None] is equally viable, and there's a lot of complications around trying to flatten them where python wont.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant