Skip to content

Commit 276f786

Browse files
authored
Merge pull request #1360 from DimitriPapadopoulos/FLY
STY: Enforce ruff/flynt rules (FLY)
2 parents c742552 + 27baa68 commit 276f786

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

nibabel/batteryrunners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def __str__(self):
252252
def message(self):
253253
"""formatted message string, including fix message if present"""
254254
if self.fix_msg:
255-
return '; '.join((self.problem_msg, self.fix_msg))
255+
return f'{self.problem_msg}; {self.fix_msg}'
256256
return self.problem_msg
257257

258258
def log_raise(self, logger, error_level=40):

nibabel/gifti/gifti.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def _to_xml_element(self):
374374
def print_summary(self):
375375
print('Dataspace: ', xform_codes.niistring[self.dataspace])
376376
print('XFormSpace: ', xform_codes.niistring[self.xformspace])
377-
print('Affine Transformation Matrix: \n', self.xform)
377+
print('Affine Transformation Matrix:\n', self.xform)
378378

379379

380380
def _data_tag_element(dataarray, encoding, dtype, ordering):

nibabel/gifti/tests/test_gifti.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,14 @@ def test_gifti_coord(capsys):
423423
gcs.xform = None
424424
gcs.print_summary()
425425
captured = capsys.readouterr()
426-
assert captured.out == '\n'.join(
427-
[
428-
'Dataspace: NIFTI_XFORM_UNKNOWN',
429-
'XFormSpace: NIFTI_XFORM_UNKNOWN',
430-
'Affine Transformation Matrix: ',
431-
' None\n',
432-
]
426+
assert (
427+
captured.out
428+
== """\
429+
Dataspace: NIFTI_XFORM_UNKNOWN
430+
XFormSpace: NIFTI_XFORM_UNKNOWN
431+
Affine Transformation Matrix:
432+
None
433+
"""
433434
)
434435
gcs.to_xml()
435436

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ select = [
120120
"B",
121121
"C4",
122122
"F",
123+
"FLY",
123124
"FURB",
124125
"I",
125126
"PIE",

0 commit comments

Comments
 (0)