Skip to content

Commit

Permalink
NF: apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiirola committed Aug 10, 2024
1 parent 7bb1f2f commit aa3ea48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyomo/core/base/set.py
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ def _cb_validate_filter(self, mode, val_iter):
"callback signature matched (block, *value). "
"Please update the callback to match the signature "
"(block, value, *index).",
version='6.7.4.dev0'
version='6.7.4.dev0',
)
orig_fcn = fcn._fcn
fcn = ParameterizedScalarCallInitializer(
Expand All @@ -1512,7 +1512,7 @@ def _cb_validate_filter(self, mode, val_iter):
"callback signature matched (block, *value, *index). "
"Please update the callback to match the signature "
"(block, value, *index).",
version='6.7.4.dev0'
version='6.7.4.dev0',
)
if fcn.__class__ is not ParameterizedInitializer:
orig_fcn = fcn._fcn
Expand Down
5 changes: 2 additions & 3 deletions pyomo/core/tests/unit/test_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -4361,7 +4361,7 @@ def _validate(model, i, j):
OUT.getvalue().replace('\n', ' '),
r"DEPRECATED: InsertionOrderSetData J1\[2,2\]: validate callback "
r"signature matched \(block, \*value\). Please update the "
r"callback to match the signature \(block, value, \*index\)"
r"callback to match the signature \(block, value, \*index\)",
)
with LoggingIntercept() as OUT:
with self.assertRaisesRegex(
Expand Down Expand Up @@ -4391,7 +4391,7 @@ def _validate(model, i, j, ind1, ind2):
OUT.getvalue().replace('\n', ' '),
r"DEPRECATED: InsertionOrderSetData J2\[2,2\]: validate callback "
r"signature matched \(block, \*value, \*index\). Please update the "
r"callback to match the signature \(block, value, \*index\)"
r"callback to match the signature \(block, value, \*index\)",
)

with LoggingIntercept() as OUT:
Expand All @@ -4414,7 +4414,6 @@ def _validate(model, i, j, ind1, ind2):
"Exception raised while validating element '(2, 2)' for Set J2[2,2]\n",
)


def _validate(model, v, ind1, ind2):
self.assertIs(model, m)
i, j = v
Expand Down

0 comments on commit aa3ea48

Please sign in to comment.