Skip to content

Commit 7a23f67

Browse files
STY: Apply ruff/Pylint rule PLE0101
PLE0101 Explicit return in `__init__`
1 parent d1930e9 commit 7a23f67

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nibabel/openers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(
6868
raise TypeError('Must define either fileobj or filename')
6969
# Cast because GzipFile.myfileobj has type io.FileIO while open returns ty.IO
7070
fileobj = self.myfileobj = ty.cast(io.FileIO, open(filename, modestr))
71-
return super().__init__(
71+
super().__init__(
7272
filename='',
7373
mode=modestr,
7474
compresslevel=compresslevel,

nibabel/tmpdirs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, suffix='', prefix=tempfile.template, dir=None):
5454
>>> os.path.exists(tmpdir)
5555
False
5656
"""
57-
return super().__init__(suffix, prefix, dir)
57+
super().__init__(suffix, prefix, dir)
5858

5959

6060
@contextmanager

0 commit comments

Comments
 (0)