Skip to content
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

STY: Enforce ruff/flake8-raise rules (RSE) #1357

Merged
merged 2 commits into from
Sep 22, 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
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 @@ -119,6 +119,7 @@ select = [
"F",
"I",
"Q",
"RSE",
"UP",
]
ignore = [
Expand Down
Loading