Skip to content

Commit b01195b

Browse files
dylwil3ntBre
andcommitted
Stabilize dataclass-enum (RUF049) (#18570)
Co-authored-by: Brent Westbrook <[email protected]>
1 parent ce176b1 commit b01195b

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

crates/ruff_linter/src/codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
10161016
(Ruff, "046") => (RuleGroup::Stable, rules::ruff::rules::UnnecessaryCastToInt),
10171017
(Ruff, "047") => (RuleGroup::Preview, rules::ruff::rules::NeedlessElse),
10181018
(Ruff, "048") => (RuleGroup::Stable, rules::ruff::rules::MapIntVersionParsing),
1019-
(Ruff, "049") => (RuleGroup::Preview, rules::ruff::rules::DataclassEnum),
1019+
(Ruff, "049") => (RuleGroup::Stable, rules::ruff::rules::DataclassEnum),
10201020
(Ruff, "051") => (RuleGroup::Stable, rules::ruff::rules::IfKeyInDictDel),
10211021
(Ruff, "052") => (RuleGroup::Preview, rules::ruff::rules::UsedDummyVariable),
10221022
(Ruff, "053") => (RuleGroup::Stable, rules::ruff::rules::ClassWithMixedTypeVars),

crates/ruff_linter/src/rules/ruff/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ mod tests {
9393
#[test_case(Rule::NeedlessElse, Path::new("RUF047_try.py"))]
9494
#[test_case(Rule::MapIntVersionParsing, Path::new("RUF048.py"))]
9595
#[test_case(Rule::MapIntVersionParsing, Path::new("RUF048_1.py"))]
96+
#[test_case(Rule::DataclassEnum, Path::new("RUF049.py"))]
9697
#[test_case(Rule::IfKeyInDictDel, Path::new("RUF051.py"))]
9798
#[test_case(Rule::UsedDummyVariable, Path::new("RUF052.py"))]
9899
#[test_case(Rule::ClassWithMixedTypeVars, Path::new("RUF053.py"))]
@@ -478,7 +479,6 @@ mod tests {
478479
#[test_case(Rule::UnnecessaryRegularExpression, Path::new("RUF055_1.py"))]
479480
#[test_case(Rule::UnnecessaryRegularExpression, Path::new("RUF055_2.py"))]
480481
#[test_case(Rule::PytestRaisesAmbiguousPattern, Path::new("RUF043.py"))]
481-
#[test_case(Rule::DataclassEnum, Path::new("RUF049.py"))]
482482
#[test_case(Rule::IndentedFormFeed, Path::new("RUF054.py"))]
483483
#[test_case(Rule::ImplicitClassVarInDataclass, Path::new("RUF045.py"))]
484484
fn preview_rules(rule_code: Rule, path: &Path) -> Result<()> {

0 commit comments

Comments
 (0)