Skip to content

Use DAG context in dag examples #12894

@JavierLopezT

Description

@JavierLopezT

The current code of dag examples is in the form of:

dag = DAG(whatever)

task_1 = Operator(task_id='dfsa', 
                               dag=dag)

As it is said in the docs (or in some article written by a commiter somewhere) it is better to have:
with DAG(whatever):
I don't have time right now to make the changes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions