bugraoz93 commented on code in PR #60193:
URL: https://github.com/apache/airflow/pull/60193#discussion_r2669839918
##########
airflow-ctl/src/airflowctl/ctl/cli_config.py:
##########
@@ -503,7 +503,28 @@ def _create_arg(
arg_action: argparse.BooleanOptionalAction | None,
arg_dest: str | None = None,
arg_default: Any | None = None,
+ is_required: bool = False, # NEW PARAMETER
Review Comment:
I think this comment shouldn't be needed.
```suggestion
is_required: bool = False,
```
##########
airflow-ctl/src/airflowctl/ctl/cli_config.py:
##########
@@ -503,7 +503,28 @@ def _create_arg(
arg_action: argparse.BooleanOptionalAction | None,
arg_dest: str | None = None,
arg_default: Any | None = None,
+ is_required: bool = False, # NEW PARAMETER
) -> Arg:
+ # Boolean flags should always remain optional (with --)
+ # Required non-boolean fields should be positional
+ should_be_positional = is_required and arg_action is None
Review Comment:
We can directly use the `is_required` parameter in the conditional statement
below
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]