From 2b633c5136c69a52f6849773cce29116fae603bc Mon Sep 17 00:00:00 2001 From: HansBug Date: Mon, 13 Feb 2023 00:45:58 +0800 Subject: [PATCH] fix(hansbug): fix bug of constraint in with_constrains --- treevalue/tree/tree/tree.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/treevalue/tree/tree/tree.pyx b/treevalue/tree/tree/tree.pyx index f4f5e0b194..ddecf39f93 100644 --- a/treevalue/tree/tree/tree.pyx +++ b/treevalue/tree/tree/tree.pyx @@ -928,9 +928,9 @@ cdef class TreeValue: @cython.binding(True) def with_constraints(self, object constraint, bool clear=False): if clear: - return self._type(self._st, to_constraint(constraint)) + return self._type(self._st, constraint=to_constraint(constraint)) else: - return self._type(self._st, to_constraint([constraint, self.constraint])) + return self._type(self._st, constraint=to_constraint([constraint, self.constraint])) cdef str _prefix_fix(object text, object prefix): cdef list lines = []