Skip to content

Commit 2b01be1

Browse files
committed
Fixed deprecated used of setParseAction
1 parent e057a03 commit 2b01be1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

iommi/query.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ def _create_grammar(self):
935935
something < 10 AND other >= 2015-01-01 AND (foo < 1 OR bar > 1)
936936
937937
"""
938-
quoted_string_excluding_quotes = QuotedString('"', esc_char='\\').setParseAction(
938+
quoted_string_excluding_quotes = QuotedString('"', esc_char='\\').set_parse_action(
939939
lambda token: StringValue(token[0])
940940
)
941941
and_ = Keyword('and', caseless=True)
@@ -950,9 +950,9 @@ def _create_grammar(self):
950950

951951
# Define a where expression
952952
where_expression = Forward()
953-
binary_operator_statement = (identifier + binary_op + value_string).setParseAction(self._binary_op_to_q)
954-
unary_operator_statement = (identifier | (Char('!') + identifier)).setParseAction(self._unary_op_to_q)
955-
free_text_statement = quotedString.copy().setParseAction(self._freetext_to_q)
953+
binary_operator_statement = (identifier + binary_op + value_string).set_parse_action(self._binary_op_to_q)
954+
unary_operator_statement = (identifier | (Char('!') + identifier)).set_parse_action(self._unary_op_to_q)
955+
free_text_statement = quotedString.copy().set_parse_action(self._freetext_to_q)
956956
operator_statement = binary_operator_statement | free_text_statement | unary_operator_statement
957957
where_condition = Group(operator_statement | ('(' + where_expression + ')'))
958958
where_expression << where_condition + ZeroOrMore((and_ | or_) + where_expression)

0 commit comments

Comments
 (0)