Skip to content

Commit fcf5342

Browse files
committed
STY: Add implicit concatenation and pytest style checks
1 parent 15260a9 commit fcf5342

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ extend-select = [
157157
"EXE",
158158
"FA",
159159
"ISC",
160+
"ICN",
161+
"PT",
160162
]
161163

162164
[tool.ruff.flake8-quotes]

smriprep/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
import numpy
3+
import numpy as np
44
import pytest
55

66
from smriprep.data import load_resource
@@ -9,8 +9,8 @@
99

1010

1111
@pytest.fixture(autouse=True)
12-
def populate_namespace(doctest_namespace, tmp_path):
12+
def _populate_namespace(doctest_namespace, tmp_path):
1313
doctest_namespace['os'] = os
14-
doctest_namespace['np'] = numpy
14+
doctest_namespace['np'] = np
1515
doctest_namespace['load'] = load_resource
1616
doctest_namespace['testdir'] = tmp_path

smriprep/utils/tests/test_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _gen_fsdir(tmp_path, isrunning):
3636

3737

3838
@pytest.mark.parametrize(
39-
'isrunning,mtime_tol,error',
39+
('isrunning', 'mtime_tol', 'error'),
4040
[
4141
(False, 86400, None),
4242
(True, 86400, RuntimeError),

smriprep/workflows/tests/test_anatomical.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545

4646
@pytest.fixture(scope='module', autouse=True)
47-
def quiet_logger():
47+
def _quiet_logger():
4848
import logging
4949

5050
logger = logging.getLogger('nipype.workflow')
@@ -59,7 +59,7 @@ def bids_root(tmp_path_factory):
5959
base = tmp_path_factory.mktemp('base')
6060
bids_dir = base / 'bids'
6161
generate_bids_skeleton(bids_dir, BASE_LAYOUT)
62-
yield bids_dir
62+
return bids_dir
6363

6464

6565
@pytest.mark.parametrize('freesurfer', [True, False])

0 commit comments

Comments
 (0)