Skip to content

Commit 427e16e

Browse files
committed
docs: some mor docs on OpenRangeTransformer
1 parent 3260e02 commit 427e16e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

luqum/utils.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,14 @@ class OpenRangeTransformer(visitor.TreeTransformer):
103103
Open ranges in OR and unknown clauses are not adjusted. Use :cls:`UnknownOperationResolver`
104104
to make sure that unknown operations are resolved first.
105105
106-
Ranges with none of the bounds set are left unadjusted. Additionally, the ranges must be
107-
direct siblings of the same parent. Ranges such as ``[foo TO *]^2 AND [* TO bar]^2`` are
108-
therefore not merged (though ``([foo TO *] AND [* TO bar])^2`` would).
106+
Ranges with none of the bounds set are left unadjusted.
107+
108+
Additionally, the ranges must be direct siblings of the same parent.
109+
Ranges such as ``[foo TO *]^2 AND [* TO bar]^2``
110+
are therefore not merged (though ``([foo TO *] AND [* TO bar])^2`` would).
111+
112+
Also not that it does not check ranges bound ordering
113+
so that you might end-up with incoherent ranges like [* TO 3] AND [4 TO *] -> [4 TO 3]
109114
"""
110115

111116
WILDCARD_WORD = Word("*")

0 commit comments

Comments
 (0)