dstandish commented on code in PR #32099:
URL: https://github.com/apache/airflow/pull/32099#discussion_r1242452545


##########
airflow/models/baseoperator.py:
##########
@@ -1001,6 +1001,17 @@ def __enter__(self):
     def __exit__(self, exc_type, exc_val, exc_tb):
         SetupTeardownContext.set_work_task_roots_and_leaves()
 
+    @staticmethod
+    def add_task_to_context(task):

Review Comment:
   what what if `__enter__` returns a setup / teardown context object and not 
the task itself.
   
   then the naming could be better:
   ```
   with s >> t as ctx:
       ctx.add_task(w)
   ```
   wdyt?



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