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}
For example, if you have a Pydantic model with an enum type, the flag will be displayed as:
Similarly, if you use a
Literal:you get:
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: