diff --git a/crates/ruff_linter/src/rules/pylint/rules/and_or_ternary.rs b/crates/ruff_linter/src/rules/pylint/rules/and_or_ternary.rs index ed7c2ef634..00f2b5194d 100644 --- a/crates/ruff_linter/src/rules/pylint/rules/and_or_ternary.rs +++ b/crates/ruff_linter/src/rules/pylint/rules/and_or_ternary.rs @@ -7,7 +7,6 @@ use ruff_text_size::{Ranged, TextRange}; use crate::checkers::ast::Checker; use crate::fix::snippet::SourceCodeSnippet; -use crate::registry::AsRule; /// ## What it does /// Checks for uses of the known pre-Python 2.5 ternary syntax. @@ -123,11 +122,9 @@ pub(crate) fn and_or_ternary(checker: &mut Checker, bool_op: &ExprBoolOp) { }, bool_op.range, ); - if checker.enabled(diagnostic.kind.rule()) { - diagnostic.set_fix(Fix::unsafe_edit(Edit::range_replacement( - ternary, - bool_op.range, - ))); - } + diagnostic.set_fix(Fix::unsafe_edit(Edit::range_replacement( + ternary, + bool_op.range, + ))); checker.diagnostics.push(diagnostic); }