Skip to content

Commit

Permalink
STY: Apply ruff/flake8-pie rule PIE810
Browse files Browse the repository at this point in the history
PIE810 Call `endswith` once with a `tuple`
  • Loading branch information
DimitriPapadopoulos committed Dec 21, 2024
1 parent 73ed096 commit 03cb3ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion niworkflows/interfaces/tests/test_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 03cb3ed

Please sign in to comment.