diff --git a/src/fmripost_aroma/tests/test_utils_bids.py b/src/fmripost_aroma/tests/test_utils_bids.py index 225c00e..0d0d795 100644 --- a/src/fmripost_aroma/tests/test_utils_bids.py +++ b/src/fmripost_aroma/tests/test_utils_bids.py @@ -145,7 +145,7 @@ def check_expected(subject_data, expected): elif isinstance(value, list): assert subject_data[key] is not None, f'Key {key} is None.' assert len(subject_data[key]) == len(value) - for item, expected_item in zip(subject_data[key], value): + for item, expected_item in zip(subject_data[key], value, strict=False): assert os.path.basename(item) == expected_item else: assert subject_data[key] is value diff --git a/src/fmripost_aroma/utils/bids.py b/src/fmripost_aroma/utils/bids.py index df4104e..bbe0701 100644 --- a/src/fmripost_aroma/utils/bids.py +++ b/src/fmripost_aroma/utils/bids.py @@ -209,7 +209,11 @@ def collect_derivatives( derivs_cache['anat2outputspaces_xfm'] = anat2outputspaces_xfm else: missing_spaces = ', '.join( - [s.space for s, found in zip(spaces.references, spaces_found) if not found] + [ + s.space + for s, found in zip(spaces.references, spaces_found, strict=False) + if not found + ] ) raise ValueError( f'Transforms to the following requested spaces not found: {missing_spaces}.' diff --git a/src/fmripost_aroma/utils/resampler.py b/src/fmripost_aroma/utils/resampler.py index 7df2174..5764226 100644 --- a/src/fmripost_aroma/utils/resampler.py +++ b/src/fmripost_aroma/utils/resampler.py @@ -4,9 +4,10 @@ import asyncio import os +from collections.abc import Callable from functools import partial from pathlib import Path -from typing import Callable, TypeVar +from typing import Annotated, TypeVar import h5py import nibabel as nb @@ -21,7 +22,6 @@ from sdcflows.transform import grid_bspline_weights from sdcflows.utils.tools import ensure_positive_cosines from templateflow import api as tf -from typing_extensions import Annotated R = TypeVar('R')