Skip to content

Commit e123a8e

Browse files
Merge pull request #827 from sadielbartholomew/open-interval-updates
Minor updates for `open_lower` and `open_upper` `cf.wi` query arguments
2 parents fb741f2 + c9aedd4 commit e123a8e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cf/query.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ class Query:
166166
evaluated.
167167
====================== ==============================================
168168
169-
In general, each method must have the query value as it's only
170-
parameter. The only exception is for `__query_isclose__`, which
169+
In general, each method must have the query value as its only
170+
parameter. The only exceptions are for `__query_isclose__`, which
171171
also requires the absolute and relative numerical tolerances to be
172-
provided.
172+
provided, and for `__query_wi__`, which also requires upper and
173+
lower interval openness Booleans to be provided.
173174
174175
When the condition is on an attribute, or nested attributes, of
175176
the operand, the query interface method is looked for on the
@@ -972,7 +973,7 @@ def _evaluate(self, x, parent_attr):
972973
if operator == "wi":
973974
_wi = getattr(x, "__query_wi__", None)
974975
if _wi is not None:
975-
return _wi(value)
976+
return _wi(value, self.open_lower, self.open_upper)
976977

977978
if self.open_lower:
978979
lower_bound = x > value[0]

0 commit comments

Comments
 (0)