From 4b64169419143fe826f28a5b338ae96dac68b690 Mon Sep 17 00:00:00 2001 From: andrecs <12188364+andrecsilva@users.noreply.github.com> Date: Mon, 13 Nov 2023 08:50:53 -0300 Subject: [PATCH] Simplified case match --- .../transformations/remove_empty_string_concatenation.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/codemodder/codemods/transformations/remove_empty_string_concatenation.py b/src/codemodder/codemods/transformations/remove_empty_string_concatenation.py index 1721c928..fbec19a9 100644 --- a/src/codemodder/codemods/transformations/remove_empty_string_concatenation.py +++ b/src/codemodder/codemods/transformations/remove_empty_string_concatenation.py @@ -19,9 +19,8 @@ def leave_FormattedStringExpression( ]: expr = original_node.expression match expr: - case SimpleString(): # type: ignore - if expr.raw_value == "": - return RemovalSentinel.REMOVE + case SimpleString() if expr.raw_value == "": # type: ignore + return RemovalSentinel.REMOVE return updated_node def leave_BinaryOperation(