Model command argument as an enum
Opened this issue · 0 comments
goldseven commented
parser.add_argument(
"command",
choices=("set-up", "update", "shell", "internal-tests"),
metavar="command",
help=_("task to perform: set-up, update, or shell"),
)
This would better be expressed using an Enum
, which is type safe and supports better type hinting and auto-completion than bare string names.