Skip to content

Commit ffa64fe

Browse files
authored
Merge pull request #48 from nipreps/sty/run-latest-ruff
STY: Run latest version of *ruff*
2 parents ceb44eb + b56e7be commit ffa64fe

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

.maint/update_authors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def zenodo(
188188
misses = set(miss_creators).intersection(miss_contributors)
189189
if misses:
190190
print(
191-
"Some people made commits, but are missing in .maint/ " f"files: {', '.join(misses)}",
191+
f"Some people made commits, but are missing in .maint/ files: {', '.join(misses)}",
192192
file=sys.stderr,
193193
)
194194

@@ -268,7 +268,7 @@ def _aslist(value):
268268

269269
if misses:
270270
print(
271-
"Some people made commits, but are missing in .maint/ " f"files: {', '.join(misses)}",
271+
f"Some people made commits, but are missing in .maint/ files: {', '.join(misses)}",
272272
file=sys.stderr,
273273
)
274274

scripts/optimize_registration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ async def train_coro(
200200
f"Avg. p95 initial error: {np.mean(start):0.2f} mm."
201201
)
202202
if verbose:
203-
logger.info(f"\n\nParameters:\n{align_kwargs}" f"\n\nConversions folder: {tmp_folder}.")
203+
logger.info(f"\n\nParameters:\n{align_kwargs}\n\nConversions folder: {tmp_folder}.")
204204

205205
return error
206206

src/nifreeze/conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import os
2626
from pathlib import Path
2727

28-
import nibabel
29-
import numpy
28+
import nibabel as nb
29+
import numpy as np
3030
import pytest
3131

3232
test_data_env = os.getenv("TEST_DATA_HOME", str(Path.home() / "nifreeze-tests"))
@@ -39,16 +39,16 @@
3939
def pytest_report_header(config):
4040
return f"""\
4141
TEST_DATA_HOME={test_data_env}.
42-
TEST_OUTPUT_DIR={test_output_dir or '<unset> (output files will be discarded)'}.
43-
TEST_WORK_DIR={test_workdir or '<unset> (intermediate files will be discarded)'}.
42+
TEST_OUTPUT_DIR={test_output_dir or "<unset> (output files will be discarded)"}.
43+
TEST_WORK_DIR={test_workdir or "<unset> (intermediate files will be discarded)"}.
4444
"""
4545

4646

4747
@pytest.fixture(autouse=True)
4848
def doctest_imports(doctest_namespace):
4949
"""Populates doctests with some conveniency imports."""
50-
doctest_namespace["np"] = numpy
51-
doctest_namespace["nb"] = nibabel
50+
doctest_namespace["np"] = np
51+
doctest_namespace["nb"] = nb
5252
doctest_namespace["os"] = os
5353
doctest_namespace["Path"] = Path
5454
doctest_namespace["repodata"] = _datadir

src/nifreeze/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def estimate(
9090
} | iter_kwargs
9191
iter_kwargs["size"] = len(data)
9292

93-
iterfunc = getattr(iterators, f'{iter_kwargs.pop("strategy", "random")}_iterator')
93+
iterfunc = getattr(iterators, f"{iter_kwargs.pop('strategy', 'random')}_iterator")
9494
index_order = list(iterfunc(**iter_kwargs))
9595

9696
align_kwargs = align_kwargs or {}

test/conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import os
2626
from pathlib import Path
2727

28-
import nibabel
29-
import numpy
28+
import nibabel as nb
29+
import numpy as np
3030
import pytest
3131

3232
test_data_env = os.getenv("TEST_DATA_HOME", str(Path.home() / "nifreeze-tests"))
@@ -39,16 +39,16 @@
3939
def pytest_report_header(config):
4040
return f"""\
4141
TEST_DATA_HOME={test_data_env}.
42-
TEST_OUTPUT_DIR={test_output_dir or '<unset> (output files will be discarded)'}.
43-
TEST_WORK_DIR={test_workdir or '<unset> (intermediate files will be discarded)'}.
42+
TEST_OUTPUT_DIR={test_output_dir or "<unset> (output files will be discarded)"}.
43+
TEST_WORK_DIR={test_workdir or "<unset> (intermediate files will be discarded)"}.
4444
"""
4545

4646

4747
@pytest.fixture(autouse=True)
4848
def doctest_imports(doctest_namespace):
4949
"""Populates doctests with some conveniency imports."""
50-
doctest_namespace["np"] = numpy
51-
doctest_namespace["nb"] = nibabel
50+
doctest_namespace["np"] = np
51+
doctest_namespace["nb"] = nb
5252
doctest_namespace["os"] = os
5353
doctest_namespace["Path"] = Path
5454
doctest_namespace["repodata"] = _datadir

0 commit comments

Comments
 (0)