Skip to content

Commit 581b700

Browse files
authored
[airflow] refactor: combine similar case condition (AIR302) (astral-sh#16944)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> combine similar case condition in AIR302 ## Test Plan <!-- How was it tested? --> nothing should be changed. existing test case should already cover it
1 parent b442ba4 commit 581b700

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -241,21 +241,9 @@ fn check_call_arguments(checker: &Checker, qualified_name: &QualifiedName, argum
241241
Some("logical_date"),
242242
));
243243
}
244-
["airflow", .., "operators", "datetime", "BranchDateTimeOperator"] => {
245-
checker.report_diagnostics(diagnostic_for_argument(
246-
arguments,
247-
"use_task_execution_day",
248-
Some("use_task_logical_date"),
249-
));
250-
}
251-
["airflow", .., "operators", "weekday", "DayOfWeekSensor"] => {
252-
checker.report_diagnostics(diagnostic_for_argument(
253-
arguments,
254-
"use_task_execution_day",
255-
Some("use_task_logical_date"),
256-
));
257-
}
258-
["airflow", .., "operators", "weekday", "BranchDayOfWeekOperator"] => {
244+
["airflow", .., "operators", "datetime", "BranchDateTimeOperator"]
245+
| ["airflow", .., "operators", "weekday", "DayOfWeekSensor" | "BranchDayOfWeekOperator"] =>
246+
{
259247
checker.report_diagnostics(diagnostic_for_argument(
260248
arguments,
261249
"use_task_execution_day",

0 commit comments

Comments
 (0)