Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 12, 2023
1 parent a9c3e7c commit c4f5b86
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions oommfc/oommf/oommf.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,9 @@ def autoselect_runner(self):
"""
log.debug(
(
"Starting autoselect_runner: cache_runner=%(cache_runner)s, "
"envvar=%(envvar)s, oommf_exe=%(oommf_exe)s, "
"docker_exe=%(docker_exe)s)"
),
"Starting autoselect_runner: cache_runner=%(cache_runner)s, "
"envvar=%(envvar)s, oommf_exe=%(oommf_exe)s, "
"docker_exe=%(docker_exe)s)",
{
"cache_runner": self.cache_runner,
"envvar": self.envvar,
Expand All @@ -485,10 +483,8 @@ def autoselect_runner(self):

# Check for the OOMMFTCL environment variable pointing to oommf.tcl.
log.debug(
(
"Step 1: Checking for the self.envvar=%(envvar)s environment"
" variable pointing to oommf.tcl."
),
"Step 1: Checking for the self.envvar=%(envvar)s environment"
" variable pointing to oommf.tcl.",
{"envvar": self.envvar},
)
oommf_tcl = os.environ.get(self.envvar, None)
Expand All @@ -501,10 +497,8 @@ def autoselect_runner(self):
else:
if res.returncode:
log.warning(
(
"OOMMFTCL is set, but OOMMF could not be run.\n"
"stdout:\n%(stdout)s\nstderr:\n%(stderr)s"
),
"OOMMFTCL is set, but OOMMF could not be run.\n"
"stdout:\n%(stdout)s\nstderr:\n%(stderr)s",
{"stdout": res.stdout, "stderr": res.stderr},
)
else:
Expand All @@ -514,10 +508,8 @@ def autoselect_runner(self):
# OOMMF available as an executable - in a conda env on Mac/Linux, or
# oommf installed separately.
log.debug(
(
"Step 2: is oommf_exe=%(oommf_exe)s in PATH? "
"Could be from conda env or manual install."
),
"Step 2: is oommf_exe=%(oommf_exe)s in PATH? "
"Could be from conda env or manual install.",
{"oommf_exe": self.oommf_exe},
)
oommf_exe = shutil.which(self.oommf_exe)
Expand Down

0 comments on commit c4f5b86

Please sign in to comment.