From 6163c99551c70d9aae8ca876ad3d02acfbf8f021 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 14 Sep 2023 21:57:48 -0400 Subject: [PATCH] Mark `PERF403` as a preview rule (#7396) --- crates/ruff/src/codes.rs | 2 +- crates/ruff_workspace/src/configuration.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ruff/src/codes.rs b/crates/ruff/src/codes.rs index f38bdb7a6d4f2..1cf96802f1a87 100644 --- a/crates/ruff/src/codes.rs +++ b/crates/ruff/src/codes.rs @@ -898,7 +898,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> { (Perflint, "203") => (RuleGroup::Unspecified, rules::perflint::rules::TryExceptInLoop), (Perflint, "401") => (RuleGroup::Unspecified, rules::perflint::rules::ManualListComprehension), (Perflint, "402") => (RuleGroup::Unspecified, rules::perflint::rules::ManualListCopy), - (Perflint, "403") => (RuleGroup::Unspecified, rules::perflint::rules::ManualDictComprehension), + (Perflint, "403") => (RuleGroup::Preview, rules::perflint::rules::ManualDictComprehension), // flake8-fixme (Flake8Fixme, "001") => (RuleGroup::Unspecified, rules::flake8_fixme::rules::LineContainsFixme), diff --git a/crates/ruff_workspace/src/configuration.rs b/crates/ruff_workspace/src/configuration.rs index 0f7cc75e8e269..701af08c380a7 100644 --- a/crates/ruff_workspace/src/configuration.rs +++ b/crates/ruff_workspace/src/configuration.rs @@ -853,6 +853,7 @@ mod tests { ]; const PREVIEW_RULES: &[Rule] = &[ + Rule::ManualDictComprehension, Rule::TooManyPublicMethods, Rule::SliceCopy, Rule::UndocumentedWarn,