Skip to content

Commit 70f225e

Browse files
committed
apply black
1 parent 8b66e10 commit 70f225e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Diff for: pyomo/util/subsystems.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626

2727
class _ExternalFunctionVisitor(StreamBasedExpressionVisitor):
28-
2928
def __init__(self, descend_into_named_expressions=True):
3029
super().__init__()
3130
self._descend_into_named_expressions = descend_into_named_expressions
@@ -56,10 +55,10 @@ def exitNode(self, node, data):
5655
def finalizeResult(self, result):
5756
return self._functions
5857

59-
#def enterNode(self, node):
58+
# def enterNode(self, node):
6059
# pass
6160

62-
#def acceptChildResult(self, node, data, child_result, child_idx):
61+
# def acceptChildResult(self, node, data, child_result, child_idx):
6362
# if child_result.__class__ in native_types:
6463
# return False, None
6564
# return child_result.is_expression_type(), None
@@ -114,6 +113,8 @@ def add_local_external_functions(block):
114113

115114

116115
from pyomo.common.timing import HierarchicalTimer
116+
117+
117118
def create_subsystem_block(
118119
constraints,
119120
variables=None,

Diff for: pyomo/util/tests/test_subsystems.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ def _make_model_with_external_functions(self, named_expressions=False):
304304
m.subexpr = pyo.Expression(pyo.PositiveIntegers)
305305
subexpr1 = m.subexpr[1] = 2 * m.fermi(m.v1)
306306
subexpr2 = m.subexpr[2] = m.bessel(m.v1) - m.bessel(m.v2)
307-
subexpr3 = m.subexpr[3] = m.subexpr[2] + m.v3 ** 2
307+
subexpr3 = m.subexpr[3] = m.subexpr[2] + m.v3**2
308308
else:
309309
subexpr1 = 2 * m.fermi(m.v1)
310310
subexpr2 = m.bessel(m.v1) - m.bessel(m.v2)
311-
subexpr3 = m.subexpr[2] + m.v3 ** 2
311+
subexpr3 = m.subexpr[2] + m.v3**2
312312
m.con1 = pyo.Constraint(expr=m.v1 == 0.5)
313313
m.con2 = pyo.Constraint(expr=subexpr1 + m.v2**2 - m.v3 == 1.0)
314314
m.con3 = pyo.Constraint(expr=subexpr3 == 2.0)

0 commit comments

Comments
 (0)