From 03d3aab254c5efe5b6ecf952577a0ed3ced16f66 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Mon, 20 Nov 2023 15:04:30 -0700 Subject: [PATCH] Apply black to context manager --- pyomo/solver/IPOPT.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyomo/solver/IPOPT.py b/pyomo/solver/IPOPT.py index b0749cba67b..6df5914c485 100644 --- a/pyomo/solver/IPOPT.py +++ b/pyomo/solver/IPOPT.py @@ -236,7 +236,9 @@ def solve(self, model, **kwds): raise RuntimeError( f"NL file with the same name {basename + '.nl'} already exists!" ) - with open(basename + '.nl', 'w') as nl_file, open(basename + '.row', 'w') as row_file, open(basename + '.col', 'w') as col_file: + with open(basename + '.nl', 'w') as nl_file, open( + basename + '.row', 'w' + ) as row_file, open(basename + '.col', 'w') as col_file: self.info = nl_writer.write( model, nl_file,