Skip to content

Commit c7c37e0

Browse files
committed
ruff ruff 🐶
1 parent 049fb42 commit c7c37e0

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

bids2table/_indexing.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,7 @@ def _contains_bids_subject_dirs(root: PathT) -> bool:
356356
"""Check if a path contains one or more BIDS subject dirs."""
357357
if not root.is_dir():
358358
return False
359-
return any(
360-
_is_bids_subject_dir(path)
361-
for path in root.iterdir()
362-
)
359+
return any(_is_bids_subject_dir(path) for path in root.iterdir())
363360

364361

365362
def _find_bids_subject_dirs(
@@ -371,11 +368,7 @@ def _find_bids_subject_dirs(
371368
Note, only looks one level down. Does not find nested subject directories, e.g. in
372369
derivatives datasets.
373370
"""
374-
paths = [
375-
path
376-
for path in root.iterdir()
377-
if _is_bids_subject_dir(path)
378-
]
371+
paths = [path for path in root.iterdir() if _is_bids_subject_dir(path)]
379372

380373
if include_subjects:
381374
filtered_names = _filter_include(

0 commit comments

Comments
 (0)