From f3284fde9aff9df55fcc0a50b0d236c7e7f5f7ba Mon Sep 17 00:00:00 2001 From: Tushar Sadhwani Date: Fri, 3 May 2024 23:49:13 +0530 Subject: [PATCH] Remove unnecessary check for RUF020 enabled (#11268) ## Summary In #9218 `Rule::NeverUnion` was partially removed from a `checker.any_enabled` call. This makes the change consistent. ## Test Plan `cargo test` --- crates/ruff_linter/src/checkers/ast/analyze/expression.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/ruff_linter/src/checkers/ast/analyze/expression.rs b/crates/ruff_linter/src/checkers/ast/analyze/expression.rs index 36a9b21e8f793..c1c912188afc9 100644 --- a/crates/ruff_linter/src/checkers/ast/analyze/expression.rs +++ b/crates/ruff_linter/src/checkers/ast/analyze/expression.rs @@ -78,7 +78,6 @@ pub(crate) fn expression(expr: &Expr, checker: &mut Checker) { Rule::DuplicateUnionMember, Rule::RedundantLiteralUnion, Rule::UnnecessaryTypeUnion, - Rule::NeverUnion, ]) { // Avoid duplicate checks if the parent is a union, since these rules already // traverse nested unions.