Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove incorrect use of identity (is) comparisons #3061

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 != []:

Check warning on line 53 in pyomo/neos/plugins/NEOS.py

View check run for this annotation

Codecov / codecov/patch

pyomo/neos/plugins/NEOS.py#L53

Added line #L53 was not covered by tests
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 @@
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 != []:

Check warning on line 263 in pyomo/opt/solver/shellcmd.py

View check run for this annotation

Codecov / codecov/patch

pyomo/opt/solver/shellcmd.py#L263

Added line #L263 was not covered by tests
print("Solver problem files: %s" % str(self._problem_files))

sys.stdout.flush()
Expand Down