Skip to content

Commit beeeb8d

Browse files
committed
Stabilize the remaining Airflow rules (#20250)
- **Stabilize `airflow3-suggested-update` (`AIR311`)** - **Stabilize `airflow3-suggested-to-move-to-provider` (`AIR312`)** - **Stabilize `airflow3-removal` (`AIR301`)** - **Stabilize `airflow3-moved-to-provider` (`AIR302`)** - **Stabilize `airflow-dag-no-schedule-argument` (`AIR002`)** I put this all in one PR to make it easier to double check with @Lee-W before we merge this. I also made a few minor documentation changes and updated one error message that I want to make sure are okay. But for the most part this just moves the rules from `RuleGroup::Preview` to `RuleGroup::Stable`! Fixes #17749
1 parent b6fca52 commit beeeb8d

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

crates/ruff_linter/src/codes.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,11 +1106,11 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
11061106

11071107
// airflow
11081108
(Airflow, "001") => (RuleGroup::Stable, rules::airflow::rules::AirflowVariableNameTaskIdMismatch),
1109-
(Airflow, "002") => (RuleGroup::Preview, rules::airflow::rules::AirflowDagNoScheduleArgument),
1110-
(Airflow, "301") => (RuleGroup::Preview, rules::airflow::rules::Airflow3Removal),
1111-
(Airflow, "302") => (RuleGroup::Preview, rules::airflow::rules::Airflow3MovedToProvider),
1112-
(Airflow, "311") => (RuleGroup::Preview, rules::airflow::rules::Airflow3SuggestedUpdate),
1113-
(Airflow, "312") => (RuleGroup::Preview, rules::airflow::rules::Airflow3SuggestedToMoveToProvider),
1109+
(Airflow, "002") => (RuleGroup::Stable, rules::airflow::rules::AirflowDagNoScheduleArgument),
1110+
(Airflow, "301") => (RuleGroup::Stable, rules::airflow::rules::Airflow3Removal),
1111+
(Airflow, "302") => (RuleGroup::Stable, rules::airflow::rules::Airflow3MovedToProvider),
1112+
(Airflow, "311") => (RuleGroup::Stable, rules::airflow::rules::Airflow3SuggestedUpdate),
1113+
(Airflow, "312") => (RuleGroup::Stable, rules::airflow::rules::Airflow3SuggestedToMoveToProvider),
11141114

11151115
// perflint
11161116
(Perflint, "101") => (RuleGroup::Stable, rules::perflint::rules::UnnecessaryListCast),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ use ruff_text_size::TextRange;
1313
use crate::{FixAvailability, Violation};
1414

1515
/// ## What it does
16-
/// Checks for uses of Airflow functions and values that have been moved to it providers.
17-
/// (e.g., apache-airflow-providers-fab)
16+
/// Checks for uses of Airflow functions and values that have been moved to its providers
17+
/// (e.g., `apache-airflow-providers-fab`).
1818
///
1919
/// ## Why is this bad?
2020
/// Airflow 3.0 moved various deprecated functions, members, and other
2121
/// values to its providers. The user needs to install the corresponding provider and replace
22-
/// the original usage with the one in the provider
22+
/// the original usage with the one in the provider.
2323
///
2424
/// ## Example
2525
/// ```python

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use ruff_text_size::TextRange;
2323
/// ## Why is this bad?
2424
/// Airflow 3.0 removed various deprecated functions, members, and other
2525
/// values. Some have more modern replacements. Others are considered too niche
26-
/// and not worth to be maintained in Airflow.
26+
/// and not worth continued maintenance in Airflow.
2727
///
2828
/// ## Example
2929
/// ```python

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ use ruff_text_size::TextRange;
1717
/// ## Why is this bad?
1818
/// Airflow 3.0 removed various deprecated functions, members, and other
1919
/// values. Some have more modern replacements. Others are considered too niche
20-
/// and not worth to be maintained in Airflow.
20+
/// and not worth continued maintenance in Airflow.
2121
/// Even though these symbols still work fine on Airflow 3.0, they are expected to be removed in a future version.
22-
/// The user is suggested to replace the original usage with the new ones.
22+
/// Where available, users should replace the removed functionality with the new alternatives.
2323
///
2424
/// ## Example
2525
/// ```python

0 commit comments

Comments
 (0)