Skip to content

Commit 2a322ff

Browse files
committed
STY: Run vanilla blue
Add fmt off/on guards for tabular comments [git-blame-ignore-rev]
1 parent 383781f commit 2a322ff

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

nibabel/cifti2/cifti2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Cifti2HeaderError(Exception):
7070

7171
CIFTI_MODEL_TYPES = (
7272
'CIFTI_MODEL_TYPE_SURFACE', # Modeled using surface vertices
73-
'CIFTI_MODEL_TYPE_VOXELS', # Modeled using voxels.
73+
'CIFTI_MODEL_TYPE_VOXELS', # Modeled using voxels.
7474
)
7575

7676
CIFTI_SERIESUNIT_TYPES = (

nibabel/freesurfer/mghformat.py

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
# See https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat
3030
DATA_OFFSET = 284
3131
# Note that mgh data is strictly big endian ( hence the > sign )
32+
# fmt: off
3233
header_dtd = [
3334
('version', '>i4'), # 0; must be 1
3435
('dims', '>i4', (4,)), # 4; width, height, depth, nframes
@@ -47,6 +48,7 @@
4748
('ti', '>f4'), # 12; inversion time
4849
('fov', '>f4'), # 16; field of view (unused)
4950
]
51+
# fmt: on
5052

5153
header_dtype = np.dtype(header_dtd)
5254
footer_dtype = np.dtype(footer_dtd)

nibabel/nifti1.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
# nifti1 flat header definition for Analyze-like first 348 bytes
3434
# first number in comments indicates offset in file header in bytes
35+
# fmt: off
3536
header_dtd = [
3637
('sizeof_hdr', 'i4'), # 0; must be 348
3738
('data_type', 'S10'), # 4; unused
@@ -75,8 +76,9 @@
7576
('srow_y', 'f4', (4,)), # 296; 2nd row affine transform
7677
('srow_z', 'f4', (4,)), # 312; 3rd row affine transform
7778
('intent_name', 'S16'), # 328; name or meaning of data
78-
('magic', 'S4'), # 344; must be 'ni1\0' or 'n+1\0'
79+
('magic', 'S4'), # 344; must be 'ni1\0' or 'n+1\0'
7980
]
81+
# fmt: on
8082

8183
# Full header numpy dtype
8284
header_dtype = np.dtype(header_dtd)

nibabel/nifti2.py

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474

7575
# nifti2 flat header definition for first 540 bytes
7676
# First number in comments indicates offset in file header in bytes
77+
# fmt: off
7778
header_dtd = [
7879
('sizeof_hdr', 'i4'), # 0; must be 540
7980
('magic', 'S4'), # 4; must be 'ni2\0' or 'n+2\0'
@@ -114,6 +115,7 @@
114115
('dim_info', 'u1'), # 524; MRI slice ordering code
115116
('unused_str', 'S15'), # 525; unused, filled with \0
116117
] # total 540
118+
# fmt: on
117119

118120
# Full header numpy dtype
119121
header_dtype = np.dtype(header_dtd)

nibabel/parrec.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
[
145145
[0, 0, -1, 0], # L -> R
146146
[-1, 0, 0, 0], # P -> A
147-
[0, 1, 0, 0], # S -> S
147+
[0, 1, 0, 0], # S -> S
148148
[0, 0, 0, 1],
149149
]
150150
)
@@ -269,6 +269,7 @@
269269
]
270270

271271
# Extra image def fields for 4.1 compared to 4
272+
# fmt: off
272273
image_def_dtds['V4.1'] = image_def_dtds['V4'] + [
273274
('diffusion b value number', int), # (imagekey!)
274275
('gradient orientation number', int), # (imagekey!)
@@ -281,6 +282,7 @@
281282
image_def_dtds['V4.2'] = image_def_dtds['V4.1'] + [
282283
('label type', int), # (imagekey!)
283284
]
285+
# fmt: on
284286

285287
#: PAR header versions we claim to understand
286288
supported_versions = list(image_def_dtds.keys())

0 commit comments

Comments
 (0)