-
Notifications
You must be signed in to change notification settings - Fork 13
Improve help for types that have choices #55
Copy link
Copy link
Open
Description
For example, if you have a Pydantic model with an enum type, the flag will be displayed as:
--skew SKEW (type:DeskewDirection default:DeskewDirection.Y)
Similarly, if you use a Literal:
class Model(BaseModel):
bar: Literal["x", "y"]you get:
--bar BAR (type:typing.Literal['x', 'y'] required=True)
In all of these cases, we have a readily accessible list of options, and it would be much more user friendly to provide these in the help.
Compare this to argparse's choices, which are printed as:
usage: game.py [-h] {rock,paper,scissors}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels