You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize that you can convert raw tuple to named tuple inside your code, but Typer's support for named tuples would improve the CLI help and make the code more visible, readable and self-documenting.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Currently Typer supports CLI options with multiple values using
tuple
type-hints.Unfortunately, it does not work for
NamedTuple
classes. It would be nice to have support for named tuples also.A CLI help for example
I realize that you can convert raw tuple to named tuple inside your code, but Typer's support for named tuples would improve the CLI help and make the code more visible, readable and self-documenting.
Operating System
Linux
Operating System Details
No response
Typer Version
0.16.0
Python Version
Python 3.11.9
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions