From a6d4e5aae4bfd5dc1777b11d8ee4629b0178acdb Mon Sep 17 00:00:00 2001 From: Brent Westbrook <36778786+ntBre@users.noreply.github.com> Date: Wed, 12 Mar 2025 08:37:11 -0400 Subject: [PATCH] [`ruff`] Stabilize `if-key-in-dict-del` (`RUF051`) (#16658) Summary -- Stabilizes RUF051. The tests and docs looked good. Test Plan -- 1 closed documentation issue from 4 days after the rule was added and 1 typo fix from the same day it was added, but no other issues or PRs. --- crates/ruff_linter/src/codes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ruff_linter/src/codes.rs b/crates/ruff_linter/src/codes.rs index ee278731cb..bc6beca498 100644 --- a/crates/ruff_linter/src/codes.rs +++ b/crates/ruff_linter/src/codes.rs @@ -1005,7 +1005,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> { (Ruff, "047") => (RuleGroup::Preview, rules::ruff::rules::NeedlessElse), (Ruff, "048") => (RuleGroup::Stable, rules::ruff::rules::MapIntVersionParsing), (Ruff, "049") => (RuleGroup::Preview, rules::ruff::rules::DataclassEnum), - (Ruff, "051") => (RuleGroup::Preview, rules::ruff::rules::IfKeyInDictDel), + (Ruff, "051") => (RuleGroup::Stable, rules::ruff::rules::IfKeyInDictDel), (Ruff, "052") => (RuleGroup::Preview, rules::ruff::rules::UsedDummyVariable), (Ruff, "053") => (RuleGroup::Preview, rules::ruff::rules::ClassWithMixedTypeVars), (Ruff, "054") => (RuleGroup::Preview, rules::ruff::rules::IndentedFormFeed),