This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit d46674a8109e31e31ebbe7b9803a53f28a8dd58e
Author: Meysam <[email protected]>
AuthorDate: Fri Oct 29 04:48:03 2021 +0300

    docs: reorder imports in tutorials 🎨 (#19035)
    
    Co-authored-by: Kaxil Naik <[email protected]>
    (cherry picked from commit 04e5fefe2f6eb40165fccbea2eb4b72bf353938a)
---
 docs/apache-airflow/tutorial.rst | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/docs/apache-airflow/tutorial.rst b/docs/apache-airflow/tutorial.rst
index acb7e84..d40f8a9 100644
--- a/docs/apache-airflow/tutorial.rst
+++ b/docs/apache-airflow/tutorial.rst
@@ -415,10 +415,9 @@ Let's break this down into 2 steps: get data & merge data:
 
 .. code-block:: python
 
-  from airflow.decorators import dag, task
-  from airflow.hooks.postgres import PostgresHook
-  from datetime import datetime, timedelta
   import requests
+  from airflow.decorators import task
+  from airflow.hooks.postgres import PostgresHook
 
 
   @task
@@ -447,6 +446,10 @@ Here we are passing a ``GET`` request to get the data from 
the URL and save it i
 
 .. code-block:: python
 
+  from airflow.decorators import task
+  from airflow.hooks.postgres import PostgresHook
+
+
   @task
   def merge_data():
       query = """
@@ -475,10 +478,11 @@ Lets look at our DAG:
 
 .. code-block:: python
 
-  from airflow.decorators import dag, task
-  from airflow.hooks.postgres_hook import PostgresHook
   from datetime import datetime, timedelta
+
   import requests
+  from airflow.decorators import dag, task
+  from airflow.hooks.postgres import PostgresHook
 
 
   @dag(

Reply via email to