vishnucoder1 commented on code in PR #35356:
URL: https://github.com/apache/airflow/pull/35356#discussion_r1402445487


##########
airflow/utils/helpers.py:
##########
@@ -325,6 +325,24 @@ def is_set(val):
     return sum(map(is_set, args)) in (0, 1)
 
 
+def at_least_one(*args) -> bool:
+    """
+    Return True if at least one of *args is "truthy", and False otherwise.
+
+    NOTSET is treated the same as None.
+
+    If user supplies an iterable, we raise ValueError and force them to unpack.
+    """
+
+    def is_set(val):
+        if val is NOTSET:
+            return False
+        else:
+            return bool(val)
+
+    return sum(map(is_set, args)) > 0

Review Comment:
   That looks better. Updated the same



-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to