Skip to content

Commit

Permalink
Merge pull request Pyomo#3061 from asifhaider/fix_logical_expressions
Browse files Browse the repository at this point in the history
Remove incorrect use of identity (is) comparisons
  • Loading branch information
blnicho authored Dec 5, 2023
2 parents c1e3d84 + 04a8809 commit de96bef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyomo/neos/plugins/NEOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def create_command_line(self, executable, problem_files):
logger.info("Solver log file: '%s'" % (self._log_file,))
if self._soln_file is not None:
logger.info("Solver solution file: '%s'" % (self._soln_file,))
if self._problem_files is not []:
if self._problem_files != []:
logger.info("Solver problem files: %s" % (self._problem_files,))

return Bunch(cmd="", log_file=self._log_file, env="")
Expand Down
2 changes: 1 addition & 1 deletion pyomo/opt/base/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def convert_problem(
if os.sep in fname: # pragma:nocover
fname = tmp.split(os.sep)[-1]
source_ptype = [guess_format(fname)]
if source_ptype is [None]:
if source_ptype == [None]:
raise ConverterError("Unknown suffix type: " + tmp)
else:
source_ptype = args[0].valid_problem_types()
Expand Down
2 changes: 1 addition & 1 deletion pyomo/opt/solver/shellcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def _apply_solver(self):
print("Solver log file: '%s'" % self._log_file)
if self._soln_file is not None:
print("Solver solution file: '%s'" % self._soln_file)
if self._problem_files is not []:
if self._problem_files != []:
print("Solver problem files: %s" % str(self._problem_files))

sys.stdout.flush()
Expand Down

0 comments on commit de96bef

Please sign in to comment.