Lee-W commented on code in PR #53849:
URL: https://github.com/apache/airflow/pull/53849#discussion_r2238287013
##########
providers/standard/src/airflow/providers/standard/operators/hitl.py:
##########
@@ -170,20 +170,27 @@ class ApprovalOperator(HITLOperator, SkipMixin):
FIXED_ARGS = ["options", "multiple"]
+ APPROVE = "Approve"
+ REJECT = "Reject"
+
def __init__(self, ignore_downstream_trigger_rules: bool = False,
**kwargs) -> None:
for arg in self.FIXED_ARGS:
if arg in kwargs:
raise ValueError(f"Passing {arg} to ApprovalOperator is not
allowed.")
self.ignore_downstream_trigger_rules = ignore_downstream_trigger_rules
- super().__init__(options=["Approve", "Reject"], multiple=False,
**kwargs)
+ super().__init__(
+ options=[ApprovalOperator.APPROVE, ApprovalOperator.REJECT],
Review Comment:
I thought using the class name was better 😲 no strong opinion, will update
it. But would love to hear more 🙂
--
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]