DelimitedList is new in pyparsing 3.1.0 and will deprecate delimited_list in a future release
This commit is contained in:
parent
5e2dd80d84
commit
114d3807d7
@ -15,13 +15,19 @@ from pyparsing import (
|
||||
Suppress,
|
||||
Word,
|
||||
alphanums,
|
||||
delimited_list,
|
||||
exceptions,
|
||||
infix_notation,
|
||||
one_of,
|
||||
pyparsing_common,
|
||||
)
|
||||
|
||||
try:
|
||||
# TODO import directly when depending on pyparsing>=3.1.0
|
||||
from pyparsing import DelimitedList
|
||||
except ImportError:
|
||||
# delimited_list is deprecated in favor of DelimitedList in pyparsing 3.1.0
|
||||
from pyparsing import delimited_list as DelimitedList
|
||||
|
||||
from .exceptions import (
|
||||
InvalidInputException,
|
||||
InvalidStateException,
|
||||
@ -279,7 +285,7 @@ class _PartitionFilterExpressionCache:
|
||||
string <<= QuotedString(quote_char="'", esc_quote="''") | lpar + string + rpar # type: ignore
|
||||
|
||||
literal = (number | string).set_name("literal")
|
||||
literal_list = delimited_list(literal, min=1).set_name("list")
|
||||
literal_list = DelimitedList(literal, min=1).set_name("list")
|
||||
|
||||
bin_op = one_of("<> >= <= > < =").set_name("binary op")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user