potiuk commented on code in PR #23335:
URL: https://github.com/apache/airflow/pull/23335#discussion_r861227623
##########
dev/breeze/src/airflow_breeze/commands/custom_param_types.py:
##########
@@ -53,6 +54,17 @@ def get_metavar(self, param) -> str:
return f"[{choices_str}]"
+class AnswerChoice(BetterChoice):
+ """
+ Stores forced answer if it has been selected
+ """
+
+ name = "AnswerChoice"
+
+ def convert(self, value, param, ctx):
+ set_forced_answer(value)
Review Comment:
This allowed us to remove manual "set_forced_answer" wherever `--answer` was
used :)
--
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]