Skip to content

Commit 95cc728

Browse files
MNT: Python 3 string formatting: %i → %d
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 9f28bc8 commit 95cc728

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nibabel/freesurfer/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def _read_annot_ctab_new_format(fobj, ctab_version):
465465
dt = _ANNOT_DT
466466
# This code works with a file version == 2, nothing else
467467
if ctab_version != 2:
468-
raise Exception('Unrecognised .annot file version (%i)', ctab_version)
468+
raise Exception(f'Unrecognised .annot file version ({ctab_version})')
469469
# maximum LUT index present in the file
470470
max_index = np.fromfile(fobj, dt, 1)[0]
471471
ctab = np.zeros((max_index, 5), dt)

nibabel/gifti/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from ..volumeutils import Recoder
1111

1212
# Translate dtype.kind char codes to XML text output strings
13-
KIND2FMT = {'i': '%i', 'u': '%i', 'f': '%10.6f', 'c': '%10.6f', 'V': ''}
13+
KIND2FMT = {'i': '%d', 'u': '%d', 'f': '%10.6f', 'c': '%10.6f', 'V': ''}
1414

1515
array_index_order_codes = Recoder(
1616
(

0 commit comments

Comments
 (0)