diff --git a/crates/ruff_linter/src/codes.rs b/crates/ruff_linter/src/codes.rs index 60dcfb38c6..e77971ddd5 100644 --- a/crates/ruff_linter/src/codes.rs +++ b/crates/ruff_linter/src/codes.rs @@ -1024,7 +1024,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> { (Ruff, "055") => (RuleGroup::Preview, rules::ruff::rules::UnnecessaryRegularExpression), (Ruff, "056") => (RuleGroup::Preview, rules::ruff::rules::FalsyDictGetFallback), (Ruff, "057") => (RuleGroup::Stable, rules::ruff::rules::UnnecessaryRound), - (Ruff, "058") => (RuleGroup::Preview, rules::ruff::rules::StarmapZip), + (Ruff, "058") => (RuleGroup::Stable, rules::ruff::rules::StarmapZip), (Ruff, "059") => (RuleGroup::Preview, rules::ruff::rules::UnusedUnpackedVariable), (Ruff, "060") => (RuleGroup::Preview, rules::ruff::rules::InEmptyCollection), (Ruff, "061") => (RuleGroup::Preview, rules::ruff::rules::LegacyFormPytestRaises), diff --git a/crates/ruff_linter/src/rules/ruff/mod.rs b/crates/ruff_linter/src/rules/ruff/mod.rs index ae885b1356..81dab73fc4 100644 --- a/crates/ruff_linter/src/rules/ruff/mod.rs +++ b/crates/ruff_linter/src/rules/ruff/mod.rs @@ -98,6 +98,8 @@ mod tests { #[test_case(Rule::ClassWithMixedTypeVars, Path::new("RUF053.py"))] #[test_case(Rule::FalsyDictGetFallback, Path::new("RUF056.py"))] #[test_case(Rule::UnnecessaryRound, Path::new("RUF057.py"))] + #[test_case(Rule::StarmapZip, Path::new("RUF058_0.py"))] + #[test_case(Rule::StarmapZip, Path::new("RUF058_1.py"))] #[test_case(Rule::UnusedUnpackedVariable, Path::new("RUF059_0.py"))] #[test_case(Rule::UnusedUnpackedVariable, Path::new("RUF059_1.py"))] #[test_case(Rule::UnusedUnpackedVariable, Path::new("RUF059_2.py"))] @@ -477,8 +479,6 @@ mod tests { #[test_case(Rule::UnnecessaryRegularExpression, Path::new("RUF055_2.py"))] #[test_case(Rule::PytestRaisesAmbiguousPattern, Path::new("RUF043.py"))] #[test_case(Rule::DataclassEnum, Path::new("RUF049.py"))] - #[test_case(Rule::StarmapZip, Path::new("RUF058_0.py"))] - #[test_case(Rule::StarmapZip, Path::new("RUF058_1.py"))] #[test_case(Rule::IndentedFormFeed, Path::new("RUF054.py"))] #[test_case(Rule::ImplicitClassVarInDataclass, Path::new("RUF045.py"))] fn preview_rules(rule_code: Rule, path: &Path) -> Result<()> { diff --git a/crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__preview__RUF058_RUF058_0.py.snap b/crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__RUF058_RUF058_0.py.snap similarity index 100% rename from crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__preview__RUF058_RUF058_0.py.snap rename to crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__RUF058_RUF058_0.py.snap diff --git a/crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__preview__RUF058_RUF058_1.py.snap b/crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__RUF058_RUF058_1.py.snap similarity index 100% rename from crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__preview__RUF058_RUF058_1.py.snap rename to crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__RUF058_RUF058_1.py.snap