uranusjr commented on code in PR #33570:
URL: https://github.com/apache/airflow/pull/33570#discussion_r1309949531


##########
airflow/ti_deps/deps/trigger_rule_dep.py:
##########
@@ -121,6 +132,13 @@ def _evaluate_trigger_rule(
         from airflow.models.operator import needs_expansion
         from airflow.models.taskinstance import TaskInstance
 
+        if ti.task.is_teardown:
+            setup_upstream_tasks = [task for task in ti.task.upstream_list if 
task.is_setup]
+        else:
+            setup_upstream_tasks = list(ti.task.get_upstreams_only_setups())

Review Comment:
   ```suggestion
           if ti.task.is_teardown:
               setup_upstream_tasks = (task for task in ti.task.upstream_list 
if task.is_setup)
           else:
               setup_upstream_tasks = ti.task.get_upstreams_only_setups()
   ```
   
   No need to build a list here as far as I can tell



-- 
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]

Reply via email to