Support Unpack
aka PEP 692 annotations
#665
Unanswered
multimeric
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
Above is a fairly simple example of how
Unpack
might be used with typer. There are many reasons why a user might want to do this, as outlined in the PEP. My immediate use case for this is to re-use an argument definition I use elsewhere, so I don't have to duplicate the function's type signature and risk the duplicated copies getting out of sync.Typer would be able to support this by introspecting the
TypedDict
using__optional_keys__
etc.Operating System
Linux, macOS
Operating System Details
Monterey (12.6)
Typer Version
0.9.0
Python Version
3.11.5
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions