Skip to content

Commit

Permalink
Improve action argument usage text
Browse files Browse the repository at this point in the history
  • Loading branch information
smkent committed Feb 21, 2023
1 parent 34d3cf0 commit c99f99d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cookie_python/manage/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ def main() -> None:
ap = argparse.ArgumentParser()
ap.add_argument(
"action",
type=lambda value: Action(str(value)),
type=Action,
choices=list(Action),
metavar="|".join([a.value for a in Action]),
help="Action to perform ("
+ ", ".join(
[f"{a.value}: {a.description}" for a in Action] # type: ignore
)
+ ")",
)
ap.add_argument("repo", nargs="+", help="Repository URL")
ap.add_argument(
Expand Down

0 comments on commit c99f99d

Please sign in to comment.