Skip to content

Commit 2e757c4

Browse files
STY: Apply ruff rule RUF010
RUF010 Use explicit conversion flag
1 parent d6d726e commit 2e757c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

niworkflows/interfaces/bids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ def _get_tf_resolution(space: str, resolution: str) -> str:
14701470
res_meta = None
14711471

14721472
# Due to inconsistencies, resolution keys may or may not be zero-padded
1473-
padded_res = f'{str(resolution):0>2}'
1473+
padded_res = f'{resolution:0>2}'
14741474
for r in (resolution, padded_res):
14751475
if r in resolutions:
14761476
res_meta = resolutions[r]

niworkflows/interfaces/tests/test_nibabel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def create_roi(tmp_path):
4949
def _create_roi(affine, img_data, roi_index):
5050
img_data[tuple(roi_index)] = 1
5151
nii = nb.Nifti1Image(img_data, affine)
52-
filename = tmp_path / f'{str(uuid.uuid4())}.nii.gz'
52+
filename = tmp_path / f'{uuid.uuid4()}.nii.gz'
5353
files.append(filename)
5454
nii.to_filename(filename)
5555
return filename

0 commit comments

Comments
 (0)