From 883c2aba24a5ff4b10a6057aa57993bd5e031095 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Mon, 20 Nov 2023 14:58:18 -0700 Subject: [PATCH] Attempt to resolve syntax issue --- pyomo/solver/IPOPT.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pyomo/solver/IPOPT.py b/pyomo/solver/IPOPT.py index d0ef744aa76..b0749cba67b 100644 --- a/pyomo/solver/IPOPT.py +++ b/pyomo/solver/IPOPT.py @@ -236,11 +236,7 @@ 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,