From e6dcdf3e498162fbe14c0a5e79da670dddd08152 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 30 Oct 2024 12:24:16 +0000 Subject: [PATCH] Switch off the `single_match_else` Clippy lint (#13994) --- Cargo.toml | 3 ++- crates/red_knot_python_semantic/src/types/infer.rs | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 681a20eb9e..b51501582c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -188,8 +188,9 @@ missing_panics_doc = "allow" module_name_repetitions = "allow" must_use_candidate = "allow" similar_names = "allow" +single_match_else = "allow" too_many_lines = "allow" -# To allow `#[allow(clippy::all)]` in `crates/ruff_python_parser/src/python.rs`. +# Without the hashes we run into a `rustfmt` bug in some snapshot tests, see #13250 needless_raw_string_hashes = "allow" # Disallowed restriction lints print_stdout = "warn" diff --git a/crates/red_knot_python_semantic/src/types/infer.rs b/crates/red_knot_python_semantic/src/types/infer.rs index d62ee02647..9eb930f54b 100644 --- a/crates/red_knot_python_semantic/src/types/infer.rs +++ b/crates/red_knot_python_semantic/src/types/infer.rs @@ -3666,7 +3666,6 @@ impl<'db> TypeInferenceBuilder<'db> { } ast::Expr::BinOp(binary) => { - #[allow(clippy::single_match_else)] match binary.op { // PEP-604 unions are okay, e.g., `int | str` ast::Operator::BitOr => {