Skip to content

Commit 0d01cda

Browse files
committed
[ruff] Stabilize map-int-version-parsing (RUF048)
Summary -- Stabilizes RUF048 and moves its test to the right place. The docs look good. Test Plan -- 0 closed or open issues. There was 1 [PR] related to an extension to the rule, but it was closed without comment. [PR]: #14701
1 parent b8f1284 commit 0d01cda

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

crates/ruff_linter/src/codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
10031003
(Ruff, "045") => (RuleGroup::Preview, rules::ruff::rules::ImplicitClassVarInDataclass),
10041004
(Ruff, "046") => (RuleGroup::Preview, rules::ruff::rules::UnnecessaryCastToInt),
10051005
(Ruff, "047") => (RuleGroup::Preview, rules::ruff::rules::NeedlessElse),
1006-
(Ruff, "048") => (RuleGroup::Preview, rules::ruff::rules::MapIntVersionParsing),
1006+
(Ruff, "048") => (RuleGroup::Stable, rules::ruff::rules::MapIntVersionParsing),
10071007
(Ruff, "049") => (RuleGroup::Preview, rules::ruff::rules::DataclassEnum),
10081008
(Ruff, "051") => (RuleGroup::Preview, rules::ruff::rules::IfKeyInDictDel),
10091009
(Ruff, "052") => (RuleGroup::Preview, rules::ruff::rules::UsedDummyVariable),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ mod tests {
8787
#[test_case(Rule::NeedlessElse, Path::new("RUF047_for.py"))]
8888
#[test_case(Rule::NeedlessElse, Path::new("RUF047_while.py"))]
8989
#[test_case(Rule::NeedlessElse, Path::new("RUF047_try.py"))]
90+
#[test_case(Rule::MapIntVersionParsing, Path::new("RUF048.py"))]
91+
#[test_case(Rule::MapIntVersionParsing, Path::new("RUF048_1.py"))]
9092
#[test_case(Rule::IfKeyInDictDel, Path::new("RUF051.py"))]
9193
#[test_case(Rule::UsedDummyVariable, Path::new("RUF052.py"))]
9294
#[test_case(Rule::FalsyDictGetFallback, Path::new("RUF056.py"))]
@@ -419,8 +421,6 @@ mod tests {
419421
Ok(())
420422
}
421423

422-
#[test_case(Rule::MapIntVersionParsing, Path::new("RUF048.py"))]
423-
#[test_case(Rule::MapIntVersionParsing, Path::new("RUF048_1.py"))]
424424
#[test_case(Rule::UnrawRePattern, Path::new("RUF039.py"))]
425425
#[test_case(Rule::UnrawRePattern, Path::new("RUF039_concat.py"))]
426426
#[test_case(Rule::UnnecessaryRegularExpression, Path::new("RUF055_0.py"))]

0 commit comments

Comments
 (0)