Skip to content

Commit 8a4fd9e

Browse files
STY: Apply ruff/flake8-raise rule RSE102
RSE102 Unnecessary parentheses on raised exception
1 parent 83eaf0b commit 8a4fd9e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nibabel/streamlines/tractogram_file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def is_correct_format(cls, fileobj):
7474
Returns True if `fileobj` is in the right streamlines file format,
7575
otherwise returns False.
7676
"""
77-
raise NotImplementedError()
77+
raise NotImplementedError
7878

7979
@classmethod
8080
def create_empty_header(cls):
@@ -101,7 +101,7 @@ def load(cls, fileobj, lazy_load=True):
101101
Returns an object containing tractogram data and header
102102
information.
103103
"""
104-
raise NotImplementedError()
104+
raise NotImplementedError
105105

106106
@abstractmethod
107107
def save(self, fileobj):
@@ -113,4 +113,4 @@ def save(self, fileobj):
113113
If string, a filename; otherwise an open file-like object
114114
opened and ready to write.
115115
"""
116-
raise NotImplementedError()
116+
raise NotImplementedError

nibabel/tests/test_volumeutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ def test_seek_tell_logic():
989989

990990
class BabyBio(BytesIO):
991991
def seek(self, *args):
992-
raise OSError()
992+
raise OSError
993993

994994
bio = BabyBio()
995995
# Fresh fileobj, position 0, can't seek - error

0 commit comments

Comments
 (0)