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 None if isinstance(condition, boolean) else condition`
--
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]