mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:41:23 +00:00
Remove unnecessary rule enabled check (#9259)
This commit is contained in:
parent
5040fb8cec
commit
506ffade6c
1 changed files with 4 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue