You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/08 16:46:49 UTC

[GitHub] [airflow] yiga2 commented on a change in pull request #20071: ShortCircuitOperator pushs XCom

yiga2 commented on a change in pull request #20071:
URL: https://github.com/apache/airflow/pull/20071#discussion_r765041550



##########
File path: airflow/operators/python.py
##########
@@ -248,7 +248,7 @@ def execute(self, context: Dict):
 
         if condition:
             self.log.info('Proceeding with downstream tasks...')
-            return
+            return condition

Review comment:
       @eladkal `condition` result is not necessarily a boolean - it can be but in a Boolean operation (like `if`), other variables evaluates to True/False - see https://docs.python.org/3/reference/expressions.html#booleans
   Some refer to that evaluation as Falsey/Truthy.
   If you feel returning a boolean is useless and a burden, we could do
   `return condition if isinstance(condition, boolean) else None`




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

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