8000 STY: Enforce ruff/flynt rules (FLY) by DimitriPapadopoulos · Pull Request #1360 · nipy/nibabel · GitHub
[go: up one dir, main page]

Skip to content

STY: Enforce ruff/flynt rules (FLY) #1360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nibabel/batteryrunners.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def __str__(self):
def message(self):
"""formatted message string, including fix message if present"""
if self.fix_msg:
return '; '.join((self.problem_msg, self.fix_msg))
return f'{self.problem_msg}; {self.fix_msg}'
return self.problem_msg

def log_raise(self, logger, error_level=40):
Expand Down
2 changes: 1 addition & 1 deletion nibabel/gifti/gifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def _to_xml_element(self):
def print_summary(self):
print('Dataspace: ', xform_codes.niistring[self.dataspace])
print('XFormSpace: ', xform_codes.niistring[self.xformspace])
print('Affine Transformation Matrix: \n', self.xform)
print('Affine Transformation Matrix:\n', self.xform)


def _data_tag_element(dataarray, encoding, dtype, ordering):
Expand Down
15 changes: 8 additions & 7 deletions nibabel/gifti/tests/test_gifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,14 @@ def test_gifti_coord(capsys):
gcs.xform = None
gcs.print_summary()
captured = capsys.readouterr()
assert captured.out == '\n'.join(
[
'Dataspace: NIFTI_XFORM_UNKNOWN',
'XFormSpace: NIFTI_XFORM_UNKNOWN',
'Affine Transformation Matrix: ',
' None\n',
]
assert (
captured.out
== """\
Dataspace: NIFTI_XFORM_UNKNOWN
XFormSpace: NIFTI_XFORM_UNKNOWN
Affine Transformation Matrix:
None
"""
)
gcs.to_xml()

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ select = [
"B",
"C4",
"F",
"FLY",
"FURB",
"I",
"PIE",
Expand Down
Loading
0