[AIRFLOW-2041] Correct Syntax in python examples

I parsed it with the ol' eyeball compiler. Someone
could flake8 it better, perhaps.
Changes:

 - correct `def` syntax on line 50
 - use literal dict on line 67

Closes #2479 from 0atman/patch-1

(cherry picked from commit fd6f1d1a07a914e23e44b853f81124c9b423d22e)
Signed-off-by: Bolke de Bruin <bo...@xs4all.nl>


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/92e2ea60
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/92e2ea60
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/92e2ea60

Branch: refs/heads/v1-10-test
Commit: 92e2ea60f7ffc584d3808e55ee1982d5da2e49c9
Parents: d35902c
Author: Tristram Oaten <o...@tman.me>
Authored: Tue Apr 24 23:04:28 2018 -0700
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Wed Apr 25 12:22:15 2018 +0200

----------------------------------------------------------------------
 docs/concepts.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/92e2ea60/docs/concepts.rst
----------------------------------------------------------------------
diff --git a/docs/concepts.rst b/docs/concepts.rst
index 3f70555..e85238d 100644
--- a/docs/concepts.rst
+++ b/docs/concepts.rst
@@ -47,7 +47,7 @@ scope.
 
     dag_1 = DAG('this_dag_will_be_discovered')
 
-    def my_function()
+    def my_function():
         dag_2 = DAG('but_this_dag_will_not')
 
     my_function()
@@ -64,9 +64,10 @@ any of its operators. This makes it easy to apply a common 
parameter to many ope
 
 .. code:: python
 
-    default_args=dict(
-        start_date=datetime(2016, 1, 1),
-        owner='Airflow')
+    default_args = {
+        'start_date': datetime(2016, 1, 1),
+        'owner': 'Airflow'
+    }
 
     dag = DAG('my_dag', default_args=default_args)
     op = DummyOperator(task_id='dummy', dag=dag)

Reply via email to