Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Sep 6, 2023
1 parent d50b2e5 commit e1141e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/ruff_workspace/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ impl Configuration {
let mut carryover_ignores: Option<&[RuleSelector]> = None;
let mut carryover_unfixables: Option<&[RuleSelector]> = None;

// Store redirects for displaying warnings
// Store selectors for displaying warnings
let mut redirects = FxHashMap::default();
let mut backwards_compat_nursery_rules = FxHashSet::default();
let mut deprecated_nursery_selectors = FxHashSet::default();
let mut ignored_preview_selectors = FxHashSet::default();

for selection in &self.rule_selections {
Expand Down Expand Up @@ -597,7 +597,7 @@ impl Configuration {
if preview.is_disabled() {
if let RuleSelector::Rule { prefix, .. } = selector {
if prefix.rules().any(|rule| rule.is_nursery()) {
backwards_compat_nursery_rules.insert(selector);
deprecated_nursery_selectors.insert(selector);
}
}

Expand Down Expand Up @@ -627,7 +627,7 @@ impl Configuration {
);
}

for selection in backwards_compat_nursery_rules {
for selection in deprecated_nursery_selectors {
let (prefix, code) = selection.prefix_and_code();
warn_user!("Selection of nursery rule `{prefix}{code}` without the `--preview` flag is deprecated.",);
}
Expand Down

0 comments on commit e1141e4

Please sign in to comment.