Replies: 3 comments
-
|
I am trying to do the same thing. I had it working in click and being able to do this in Typer would ideal. I have a slight difference in that I want to pass in extra parameters instead of just reusing but essentially the same use case. Would love any feedback if anyone has any on how to go about this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Nice feature. Any updates on this? I know tyro is able to achieve this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
The solution with dataclasses is the same as requested in #154 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem
There is no way currently in
typerto reuse options and their processing.With
clickthis is something you'd do with decorators:The solution you would like
Options definitions could be packed in
dataclasses:While not exactly equivalent to the decorator approach (you can't factorize the processing), I like this too. What do you think?
Beta Was this translation helpful? Give feedback.
All reactions