Skip to content
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 niworkflows/engine/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..plugin import MultiProcPlugin


def add(x, y):
def add(x, y): # noqa: FURB118 # the Function interface does not support builtin functions
return x + y


Expand Down
2 changes: 1 addition & 1 deletion niworkflows/reports/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def __init__(
self.packagename = packagename
self.subject_id = subject_id
if subject_id is not None:
self.subject_id = subject_id[4:] if subject_id.startswith('sub-') else subject_id
self.subject_id = subject_id.removeprefix('sub-')
self.out_filename = f'sub-{self.subject_id}.html'

# Default template from niworkflows
Expand Down
2 changes: 1 addition & 1 deletion niworkflows/utils/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def collect_participants(bids_dir, participant_label=None, strict=False, bids_va
participant_label = [participant_label]

# Drop sub- prefixes
participant_label = [sub[4:] if sub.startswith('sub-') else sub for sub in participant_label]
participant_label = [sub.removeprefix('sub-') for sub in participant_label]
# Remove duplicates
participant_label = sorted(set(participant_label))
# Remove labels not found
Expand Down
13 changes: 7 additions & 6 deletions niworkflows/utils/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,13 @@ def test_clean_symlink(tmp_path):


def _gen_skeleton(root):
dirs, files = [], []
files.append(root / 'file1')
files.append(root / '.file2')
dirs.append(root / 'subdir1')
files.append(dirs[0] / 'file3')
files.append(dirs[0] / '.file4')
dirs = [root / 'subdir1']
files = [
root / 'file1',
root / '.file2',
dirs[0] / 'file3',
dirs[0] / '.file4',
]
for d in dirs:
d.mkdir()
for f in files:
Expand Down
Loading