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 2022/04/13 12:19:59 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #22974: Replace usage of `DummyOperator` with `EmptyOperator`

potiuk commented on code in PR #22974:
URL: https://github.com/apache/airflow/pull/22974#discussion_r849416911


##########
tests/dags/test_only_empty_tasks.py:
##########
@@ -41,14 +41,14 @@ def __init__(self, body, *args, **kwargs):
 
 
 with dag:
-    task_a = DummyOperator(task_id="test_task_a")
+    task_a = EmptyOperator(task_id="test_task_a")
 
-    task_b = DummyOperator(task_id="test_task_b")
+    task_b = EmptyOperator(task_id="test_task_b")
 
     task_a >> task_b
 
-    task_c = MyDummyOperator(task_id="test_task_c", body={"hello": "world"})
+    task_c = MyEmptyOperator(task_id="test_task_c", body={"hello": "world"})
 
-    task_d = DummyOperator(task_id="test_task_on_execute", on_execute_callback=lambda *args, **kwargs: 1)
+    task_d = EmptyOperator(task_id="test_task_on_execute", on_execute_callback=lambda *args, **kwargs: 1)
 
-    task_e = DummyOperator(task_id="test_task_on_success", on_success_callback=lambda *args, **kwargs: 1)
+    task_e = EmptyOperator(task_id="test_task_on_success", on_success_callback=lambda *args, **kwargs: 1)

Review Comment:
   Why do we have `**kwargs: 1` there ? I do not understand it - I believe it should be `**kwargs: 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