-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove check for deprecated arguments from AIR301
We'll do them in AIR302 instead.
- Loading branch information
Showing
3 changed files
with
17 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 10 additions & 44 deletions
54
...ter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR301_AIR301.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,20 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/airflow/mod.rs | ||
--- | ||
AIR301.py:4:1: AIR301 DAG should have an explicit `schedule` argument | ||
AIR301.py:3:1: AIR301 DAG should have an explicit `schedule` argument | ||
| | ||
2 | from airflow.timetables.trigger import CronTriggerTimetable | ||
3 | | ||
4 | DAG(dag_id="class_default_schedule") | ||
1 | from airflow import DAG, dag | ||
2 | | ||
3 | DAG(dag_id="class_default_schedule") | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301 | ||
5 | | ||
6 | DAG(dag_id="class_schedule", schedule="@hourly") | ||
4 | | ||
5 | DAG(dag_id="class_schedule", schedule="@hourly") | ||
| | ||
|
||
AIR301.py:8:31: AIR301 argument `timetable` is deprecated; use `schedule` instead | ||
AIR301.py:8:2: AIR301 DAG should have an explicit `schedule` argument | ||
| | ||
6 | DAG(dag_id="class_schedule", schedule="@hourly") | ||
7 | | ||
8 | DAG(dag_id="class_timetable", timetable=CronTriggerTimetable()) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301 | ||
9 | | ||
10 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly") | ||
| | ||
|
||
AIR301.py:10:39: AIR301 argument `schedule_interval` is deprecated; use `schedule` instead | ||
| | ||
8 | DAG(dag_id="class_timetable", timetable=CronTriggerTimetable()) | ||
9 | | ||
10 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly") | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301 | ||
| | ||
|
||
AIR301.py:13:2: AIR301 DAG should have an explicit `schedule` argument | ||
| | ||
13 | @dag() | ||
8 | @dag() | ||
| ^^^^^ AIR301 | ||
14 | def decorator_default_schedule(): | ||
15 | pass | ||
| | ||
|
||
AIR301.py:23:6: AIR301 argument `timetable` is deprecated; use `schedule` instead | ||
| | ||
23 | @dag(timetable=CronTriggerTimetable()) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301 | ||
24 | def decorator_timetable(): | ||
25 | pass | ||
| | ||
|
||
AIR301.py:28:6: AIR301 argument `schedule_interval` is deprecated; use `schedule` instead | ||
| | ||
28 | @dag(schedule_interval="0 * * * *") | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301 | ||
29 | def decorator_schedule_interval(): | ||
30 | pass | ||
9 | def decorator_default_schedule(): | ||
10 | pass | ||
| |