You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/05/16 09:29:29 UTC
[GitHub] [airflow] hussein-awala commented on a diff in pull request #31308: Added metavar and choices to --state flag in airflow dags list-jobs CLI for suggesting valid state arguments.
hussein-awala commented on code in PR #31308:
URL: https://github.com/apache/airflow/pull/31308#discussion_r1194884425
##########
airflow/cli/cli_config.py:
##########
@@ -277,7 +277,12 @@ def string_lower_type(val):
ARG_NO_BACKFILL = Arg(
("--no-backfill",), help="filter all the backfill dagruns given the dag id", action="store_true"
)
-ARG_STATE = Arg(("--state",), help="Only list the dag runs corresponding to the state")
+ARG_STATE = Arg(
+ ("--state",),
+ help="Only list the dag runs corresponding to the state",
+ metavar="(table, json, yaml, plain)",
+ choices=("table", "json", "yaml", "plain"),
+)
Review Comment:
you just copied the choices from `ARG_OUTPUT`.
The choice for the dag run state are `running`, `queued`, `success` and `failed`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org