File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 66from __future__ import annotations
77
88import contextlib
9- import importlib .util
109import enum
10+ import importlib .util
1111import io
1212import logging
1313import os
@@ -332,7 +332,10 @@ def __init__(
332332 super ().__init__ (** solver_options )
333333
334334 def check_solver_installation (self , package_name ):
335- if sub .run ([which , "cbc" ], stdout = sub .DEVNULL , stderr = sub .STDOUT ).returncode != 0 :
335+ if (
336+ sub .run ([which , "cbc" ], stdout = sub .DEVNULL , stderr = sub .STDOUT ).returncode
337+ != 0
338+ ):
336339 msg = f"Solver package '{ package_name } ' is not installed. Please install first to initialize solver instance."
337340 raise ImportError (msg )
338341
@@ -497,7 +500,10 @@ def __init__(
497500 super ().__init__ (** solver_options )
498501
499502 def check_solver_installation (self , package_name ):
500- if sub .run ([which , "glpsol" ], stdout = sub .DEVNULL , stderr = sub .STDOUT ).returncode != 0 :
503+ if (
504+ sub .run ([which , "glpsol" ], stdout = sub .DEVNULL , stderr = sub .STDOUT ).returncode
505+ != 0
506+ ):
501507 msg = f"Solver package '{ package_name } ' is not installed. Please install first to initialize solver instance."
502508 raise ImportError (msg )
503509
You can’t perform that action at this time.
0 commit comments