mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:53 +00:00

## Summary Unlike other AIR3XX rules, this best practice can be applied to Airflow 1 and Airflow 2 as well. Thus, we think it might make sense for use to move it to AIR002 so that the first number of the error align to Airflow version as possible to reduce confusion ## Test Plan the test fixture has been updated
30 lines
563 B
Python
30 lines
563 B
Python
from airflow import DAG, dag
|
|
from airflow.timetables.simple import NullTimetable
|
|
|
|
DAG(dag_id="class_default_schedule")
|
|
|
|
DAG(dag_id="class_schedule", schedule="@hourly")
|
|
|
|
DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
|
|
|
DAG(dag_id="class_timetable", timetable=NullTimetable())
|
|
|
|
|
|
@dag()
|
|
def decorator_default_schedule():
|
|
pass
|
|
|
|
|
|
@dag(schedule="0 * * * *")
|
|
def decorator_schedule():
|
|
pass
|
|
|
|
|
|
@dag(schedule_interval="0 * * * *")
|
|
def decorator_schedule_interval():
|
|
pass
|
|
|
|
|
|
@dag(timetable=NullTimetable())
|
|
def decorator_timetable():
|
|
pass
|