Skip to content

Commit

Permalink
Merge pull request #1357 from DimitriPapadopoulos/RSE
Browse files Browse the repository at this point in the history
STY: Enforce ruff/flake8-raise rules (RSE)
  • Loading branch information
effigies authored Sep 22, 2024
2 parents b445375 + 47df196 commit 9438297
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions nibabel/streamlines/tractogram_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def is_correct_format(cls, fileobj):
Returns True if `fileobj` is in the right streamlines file format,
otherwise returns False.
"""
raise NotImplementedError()
raise NotImplementedError

@classmethod
def create_empty_header(cls):
Expand All @@ -101,7 +101,7 @@ def load(cls, fileobj, lazy_load=True):
Returns an object containing tractogram data and header
information.
"""
raise NotImplementedError()
raise NotImplementedError

@abstractmethod
def save(self, fileobj):
Expand All @@ -113,4 +113,4 @@ def save(self, fileobj):
If string, a filename; otherwise an open file-like object
opened and ready to write.
"""
raise NotImplementedError()
raise NotImplementedError
2 changes: 1 addition & 1 deletion nibabel/tests/test_volumeutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ def test_seek_tell_logic():

class BabyBio(BytesIO):
def seek(self, *args):
raise OSError()
raise OSError

bio = BabyBio()
# Fresh fileobj, position 0, can't seek - error
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ select = [
"I",
"PLE",
"Q",
"RSE",
"UP",
]
ignore = [
Expand Down

0 comments on commit 9438297

Please sign in to comment.