Skip to content

Commit fd656e0

Browse files
committed
run black
1 parent f195650 commit fd656e0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pyomo/contrib/solver/tests/solvers/test_solvers.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1509,11 +1509,13 @@ def test_bug_2(self, name: str, opt_class: Type[SolverBase], use_presolve: bool)
15091509
self.assertAlmostEqual(res.incumbent_objective, -18, 5)
15101510

15111511
@parameterized.expand(input=_load_tests(nl_solvers))
1512-
def test_presolve_with_zero_coef(self, name: str, opt_class: Type[SolverBase], use_presolve: bool):
1512+
def test_presolve_with_zero_coef(
1513+
self, name: str, opt_class: Type[SolverBase], use_presolve: bool
1514+
):
15131515
opt: SolverBase = opt_class()
15141516
if not opt.available():
15151517
raise unittest.SkipTest(f'Solver {opt.name} not available.')
1516-
1518+
15171519
"""
15181520
when c2 gets presolved out, c1 becomes
15191521
x - y + y = 0 which becomes

pyomo/repn/plugins/nl_writer.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,9 @@ def _linear_presolve(self, comp_by_linear_var, lcon_by_linear_nnz, var_bounds):
17991799
lb, ub = var_bounds[_id]
18001800
if a == 0:
18011801
if (lb is not None and lb > b) or (ub is not None and ub < b):
1802-
raise InfeasibleConstraintException(f'Model is infeasible: {lb} <= {var_map[_id]} <= {ub} and {var_map[_id]} == {a}*{var_map[x]} + {b} cannot both be satisfied')
1802+
raise InfeasibleConstraintException(
1803+
f'Model is infeasible: {lb} <= {var_map[_id]} <= {ub} and {var_map[_id]} == {a}*{var_map[x]} + {b} cannot both be satisfied'
1804+
)
18031805
else:
18041806
x_lb, x_ub = var_bounds[x]
18051807
if lb is not None:

0 commit comments

Comments
 (0)