Skip to content

Commit

Permalink
Stabilise redirected-noqa (RUF101) (#12869)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored and MichaReiser committed Aug 14, 2024
1 parent d8ebb03 commit 33512a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
(Ruff, "030") => (RuleGroup::Preview, rules::ruff::rules::AssertWithPrintMessage),
(Ruff, "031") => (RuleGroup::Preview, rules::ruff::rules::IncorrectlyParenthesizedTupleInSubscript),
(Ruff, "100") => (RuleGroup::Stable, rules::ruff::rules::UnusedNOQA),
(Ruff, "101") => (RuleGroup::Preview, rules::ruff::rules::RedirectedNOQA),
(Ruff, "101") => (RuleGroup::Stable, rules::ruff::rules::RedirectedNOQA),

(Ruff, "200") => (RuleGroup::Stable, rules::ruff::rules::InvalidPyprojectToml),
#[cfg(any(feature = "test-rules", test))]
Expand Down
4 changes: 2 additions & 2 deletions crates/ruff_linter/src/rules/ruff/rules/redirected_noqa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use crate::rule_redirects::get_redirect_target;
/// Checks for `noqa` directives that use redirected rule codes.
///
/// ## Why is this bad?
/// When a rule code has been redirected, the implication is that the rule has
/// been deprecated in favor of another rule or code. To keep the codebase
/// When one of Ruff's rule codes has been redirected, the implication is that the rule has
/// been deprecated in favor of another rule or code. To keep your codebase
/// consistent and up-to-date, prefer the canonical rule code over the deprecated
/// code.
///
Expand Down

0 comments on commit 33512a4

Please sign in to comment.