@@ -337,11 +337,11 @@ def _evaluate_filter(self, filter_expression: str, deserialized_msg: Deserialize
337337
338338 def _split_logical_operator (self , expression : str , operator : str ) -> list [str ] | None :
339339 """Split expression on logical operator, respecting quoted strings.
340-
340+
341341 Args:
342342 expression: The expression to split
343343 operator: The operator to split on (' and ' or ' or ')
344-
344+
345345 Returns:
346346 List of parts if operator found outside quotes, None otherwise
347347 """
@@ -350,10 +350,10 @@ def _split_logical_operator(self, expression: str, operator: str) -> list[str] |
350350 i = 0
351351 in_quotes = False
352352 quote_char = None
353-
353+
354354 while i < len (expression ):
355355 char = expression [i ]
356-
356+
357357 # Track quote state
358358 if char in ('"' , "'" ) and (i == 0 or expression [i - 1 ] != '\\ ' ):
359359 if not in_quotes :
@@ -362,20 +362,20 @@ def _split_logical_operator(self, expression: str, operator: str) -> list[str] |
362362 elif char == quote_char :
363363 in_quotes = False
364364 quote_char = None
365-
365+
366366 # Check for operator outside quotes
367- if not in_quotes and expression [i : i + len (operator )] == operator :
367+ if not in_quotes and expression [i : i + len (operator )] == operator :
368368 parts .append ('' .join (current ))
369369 current = []
370370 i += len (operator )
371371 continue
372-
372+
373373 current .append (char )
374374 i += 1
375-
375+
376376 # Add the last part
377377 parts .append ('' .join (current ))
378-
378+
379379 # Return None if we didn't actually split (only one part)
380380 return parts if len (parts ) > 1 else None
381381
@@ -393,7 +393,7 @@ def _evaluate_jq_expression(self, expression: str, context: dict) -> bool:
393393 parts = self ._split_logical_operator (expression , ' or ' )
394394 if parts :
395395 return any (self ._evaluate_jq_expression (part .strip (), context ) for part in parts )
396-
396+
397397 parts = self ._split_logical_operator (expression , ' and ' )
398398 if parts :
399399 return all (self ._evaluate_jq_expression (part .strip (), context ) for part in parts )
0 commit comments