diff --git a/nibabel/openers.py b/nibabel/openers.py index c3fa9a478..9a306d4e4 100644 --- a/nibabel/openers.py +++ b/nibabel/openers.py @@ -68,7 +68,7 @@ def __init__( raise TypeError('Must define either fileobj or filename') # Cast because GzipFile.myfileobj has type io.FileIO while open returns ty.IO fileobj = self.myfileobj = ty.cast(io.FileIO, open(filename, modestr)) - return super().__init__( + super().__init__( filename='', mode=modestr, compresslevel=compresslevel, diff --git a/nibabel/tmpdirs.py b/nibabel/tmpdirs.py index 9d67f6acb..2bcf9fdeb 100644 --- a/nibabel/tmpdirs.py +++ b/nibabel/tmpdirs.py @@ -54,7 +54,7 @@ def __init__(self, suffix='', prefix=tempfile.template, dir=None): >>> os.path.exists(tmpdir) False """ - return super().__init__(suffix, prefix, dir) + super().__init__(suffix, prefix, dir) @contextmanager diff --git a/pyproject.toml b/pyproject.toml index 2840119c4..915ea9b81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,6 +118,7 @@ exclude = ["doc", "nibabel/externals", "tools", "version.py", "versioneer.py"] select = [ "F", "I", + "PLE", "Q", "UP", ]