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


##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -413,7 +411,13 @@ You can also combine this with the 
:ref:`concepts:depends-on-past` functionality
         )
 
         run_this_first = EmptyOperator(task_id="run_this_first", dag=dag)
-        branching = BranchPythonOperator(task_id="branching", dag=dag, 
python_callable=lambda: "branch_a")
+
+        @task.branch(task_id="branching")
+        def branching():
+            return "branch_a"
+
+        
+        branching = branching()

Review Comment:
   One reason is that Mypy would complain since the types of the two are not 
compatible.



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