Skip to content

Commit

Permalink
Merge pull request #132 from ubermag/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
lang-m committed Oct 6, 2023
2 parents b78386c + c4f5b86 commit b24e578
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ repos:
- id: nbqa-isort # isort inside Jupyter notebooks

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-rst-docstrings] #, flake8-docstrings]

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.9.1
hooks:
- id: black-jupyter

Expand Down
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 b24e578

Please sign in to comment.