This is an automated email from the ASF dual-hosted git repository. pierrejeambrun pushed a commit to branch v2-5-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 0bab483f43d761293b863fbad1bd288f6efeda84 Author: Frank Cash <[email protected]> AuthorDate: Wed Jan 18 15:18:48 2023 -0500 change context example to no longer us as variable (#29021) https://airflow.apache.org/docs/apache-airflow/stable/release_notes.html#dags-used-in-a-context-manager-no-longer-need-to-be-assigned-to-a-module-variable-23592 (cherry picked from commit bc5cecc0db27cb8684c238b36ad12c7217d0c3ca) --- docs/apache-airflow/core-concepts/dags.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/apache-airflow/core-concepts/dags.rst b/docs/apache-airflow/core-concepts/dags.rst index 91bcde51ca..527965b9e6 100644 --- a/docs/apache-airflow/core-concepts/dags.rst +++ b/docs/apache-airflow/core-concepts/dags.rst @@ -40,7 +40,7 @@ which will add the DAG to anything inside it implicitly:: with DAG( "my_dag_name", start_date=pendulum.datetime(2021, 1, 1, tz="UTC"), schedule="@daily", catchup=False - ) as dag: + ): op = EmptyOperator(task_id="task") Or, you can use a standard constructor, passing the dag into any
