You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "josh-fell (via GitHub)" <gi...@apache.org> on 2023/08/03 03:13:38 UTC

[GitHub] [airflow] josh-fell commented on a diff in pull request #30591: standardize docs to `with DAG`

josh-fell commented on code in PR #30591:
URL: https://github.com/apache/airflow/pull/30591#discussion_r1282595905


##########
docs/apache-airflow/core-concepts/dags.rst:
##########
@@ -148,10 +148,14 @@ This means you can define multiple DAGs per Python file, or even spread one very
 
 Note, though, that when Airflow comes to load DAGs from a Python file, it will only pull any objects at the *top level* that are a DAG instance. For example, take this DAG file::
 
-    dag_1 = DAG('this_dag_will_be_discovered')
+    with DAG('this_dag_will_be_discovered') as dag:

Review Comment:
   @fritz-astronomer Any chance these `as dag:` bits could be removed as @jedcunningham mentioned?



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