From 03cb3edf999d8d7656d397356b1ec5b53b50567b Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 21 Dec 2024 18:49:48 +0100 Subject: [PATCH] STY: Apply ruff/flake8-pie rule PIE810 PIE810 Call `endswith` once with a `tuple` --- niworkflows/interfaces/tests/test_bids.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/niworkflows/interfaces/tests/test_bids.py b/niworkflows/interfaces/tests/test_bids.py index d531d0a8e6d..3b3c991dda7 100644 --- a/niworkflows/interfaces/tests/test_bids.py +++ b/niworkflows/interfaces/tests/test_bids.py @@ -367,7 +367,7 @@ def test_DerivativesDataSink_build_path( for out, exp in zip(output, expectation): assert Path(out).relative_to(base_directory) == Path(base) / exp # Regression - some images were given nan scale factors - if out.endswith('.nii') or out.endswith('.nii.gz'): + if out.endswith(('.nii', '.nii.gz')): img = nb.load(out) if isinstance(img, nb.Nifti1Image): with nb.openers.ImageOpener(out) as fobj: