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


##########
docs/apache-airflow/core-concepts/dags.rst:
##########
@@ -487,39 +522,50 @@ Unlike :ref:`concepts:subdags`, TaskGroups are purely a 
UI grouping concept. Tas
 
 .. image:: /img/task_group.gif
 
-Dependency relationships can be applied across all tasks in a TaskGroup with 
the ``>>`` and ``<<`` operators. For example, the following code puts ``task1`` 
and ``task2`` in TaskGroup ``group1`` and then puts both tasks upstream of 
``task3``::
+Dependency relationships can be applied across all tasks in a TaskGroup with 
the ``>>`` and ``<<`` operators. For example, the following code puts ``task1`` 
and ``task2`` in TaskGroup ``group1`` and then puts both tasks upstream of 
``task3``:
+
+.. code-block:: python
+   :emphasize-lines: 10
 
     from airflow.decorators import task_group
 
+
     @task_group()
     def group1():
         task1 = EmptyOperator(task_id="task1")
         task2 = EmptyOperator(task_id="task2")
 
+
     task3 = EmptyOperator(task_id="task3")
 
     group1() >> task3
 
-TaskGroup also supports ``default_args`` like DAG, it will overwrite the 
``default_args`` in DAG level::
+TaskGroup also supports ``default_args`` like DAG, it will overwrite the 
``default_args`` in DAG level:
 
-    import pendulum
+.. code-block:: python
+    :emphasize-lines: 15
+
+    import datetime
 
+    from airflow import DAG
     from airflow.decorators import task_group
+    from airflow.operators.bash import BashOperator
+    from airflow.operators.empty import EmptyOperator
 
     with DAG(
-        dag_id='dag1',
-        start_date=pendulum.datetime(2016, 1, 1, tz="UTC"),
+        dag_id="dag1",
+        start_date=datetime.datetime(2016, 1, 1),

Review Comment:
   Jut a note that these are not functionally equivalent; using 
`datetime.datetime` would make Airflow use the timezone configured in 
`airflow.cfg`.



##########
docs/apache-airflow/core-concepts/dags.rst:
##########
@@ -487,39 +522,50 @@ Unlike :ref:`concepts:subdags`, TaskGroups are purely a 
UI grouping concept. Tas
 
 .. image:: /img/task_group.gif
 
-Dependency relationships can be applied across all tasks in a TaskGroup with 
the ``>>`` and ``<<`` operators. For example, the following code puts ``task1`` 
and ``task2`` in TaskGroup ``group1`` and then puts both tasks upstream of 
``task3``::
+Dependency relationships can be applied across all tasks in a TaskGroup with 
the ``>>`` and ``<<`` operators. For example, the following code puts ``task1`` 
and ``task2`` in TaskGroup ``group1`` and then puts both tasks upstream of 
``task3``:
+
+.. code-block:: python
+   :emphasize-lines: 10
 
     from airflow.decorators import task_group
 
+
     @task_group()
     def group1():
         task1 = EmptyOperator(task_id="task1")
         task2 = EmptyOperator(task_id="task2")
 
+
     task3 = EmptyOperator(task_id="task3")
 
     group1() >> task3
 
-TaskGroup also supports ``default_args`` like DAG, it will overwrite the 
``default_args`` in DAG level::
+TaskGroup also supports ``default_args`` like DAG, it will overwrite the 
``default_args`` in DAG level:
 
-    import pendulum
+.. code-block:: python
+    :emphasize-lines: 15
+
+    import datetime
 
+    from airflow import DAG
     from airflow.decorators import task_group
+    from airflow.operators.bash import BashOperator
+    from airflow.operators.empty import EmptyOperator
 
     with DAG(
-        dag_id='dag1',
-        start_date=pendulum.datetime(2016, 1, 1, tz="UTC"),
+        dag_id="dag1",
+        start_date=datetime.datetime(2016, 1, 1),

Review Comment:
   Just a note that these are not functionally equivalent; using 
`datetime.datetime` would make Airflow use the timezone configured in 
`airflow.cfg`.



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