From dcfcf4d0cbdc1789e0abe91790991cdd830f4f18 Mon Sep 17 00:00:00 2001 From: Alex Ley Date: Sat, 26 Oct 2024 23:40:59 +0100 Subject: [PATCH] fix(python): simplify `check_replacements()` to only check if the prev node is empty fixes #416 --- crates/language/src/python.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/language/src/python.rs b/crates/language/src/python.rs index 3faf4b36e..5e0171f8a 100644 --- a/crates/language/src/python.rs +++ b/crates/language/src/python.rs @@ -89,7 +89,7 @@ impl Language for Python { // https://github.com/getgrit/gritql/issues/416 multi line example if let Some(prev) = n.node.prev_sibling() { let empty = prev.range().end_byte() == prev.range().start_byte(); - if prev.kind() == "identifier" && empty { + if empty { replacements.push(Replacement::new(n.range(), "")); return; }