Skip to content

Commit df6e871

Browse files
committed
Search whole constraint when filtering show output.
Match the search string either in constraint variable or in the formula.
1 parent deded8f commit df6e871

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: diffpy/srfit/fitbase/recipeorganizer.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -981,12 +981,13 @@ def show(self, pattern="", textwidth=78):
981981

982982
# FIXME - parameter names in equations not particularly informative
983983
# Show constraints
984+
cmatch = regexp.search
984985
tlines = self._formatConstraints()
985986
if tlines:
986987
if lines:
987988
lines.append("")
988989
lines.extend(["Constraints", _DASHEDLINE])
989-
lines.extend(filter(pmatch, tlines))
990+
lines.extend(filter(cmatch, tlines))
990991

991992
# FIXME - parameter names in equations not particularly informative
992993
# Show restraints

0 commit comments

Comments
 (0)