Lee-W commented on code in PR #54827:
URL: https://github.com/apache/airflow/pull/54827#discussion_r2303243975
##########
providers/standard/src/airflow/providers/standard/operators/hitl.py:
##########
@@ -87,12 +89,33 @@ def __init__(
self.respondents = [respondents] if isinstance(respondents, str) else
respondents
self.validate_options()
+ self.validate_params()
self.validate_defaults()
def validate_options(self) -> None:
+ """
+ Validate the `options` attribute of the instance.
+
+ Raises:
+ ValueError: If `options` is empty.
+ ValueError: If any option contains a comma (`,`), which is not
allowed.
+ """
if not self.options:
raise ValueError('"options" cannot be empty.')
+ if any("," in option for option in self.options):
+ raise ValueError('"," is not allowed in option')
+
+ def validate_params(self) -> None:
Review Comment:
Not really. it's part of the `__init__`. `__init__` raises error if
`validte_parms` does not pass
--
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]