summaryrefslogtreecommitdiff
path: root/numpy/testing/_private/utils.py
diff options
context:
space:
mode:
authorMike Taves <mwtoews@gmail.com>2021-03-19 22:03:06 +1300
committerMike Taves <mwtoews@gmail.com>2021-03-19 22:14:30 +1300
commitc1aa1af62f6e9fcdda92d6d0991b15051a565814 (patch)
tree91d6c55737d99f5e6e97c0991a0dbb863e0a75cd /numpy/testing/_private/utils.py
parent60cd9d717524e5a003bee9e4270b9c6b8144a7af (diff)
downloadnumpy-c1aa1af62f6e9fcdda92d6d0991b15051a565814.tar.gz
MAINT: use super() as described by PEP 3135
Diffstat (limited to 'numpy/testing/_private/utils.py')
-rw-r--r--numpy/testing/_private/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py
index b4d42728e..5b87d0a06 100644
--- a/numpy/testing/_private/utils.py
+++ b/numpy/testing/_private/utils.py
@@ -2006,7 +2006,7 @@ class clear_and_catch_warnings(warnings.catch_warnings):
def __init__(self, record=False, modules=()):
self.modules = set(modules).union(self.class_modules)
self._warnreg_copies = {}
- super(clear_and_catch_warnings, self).__init__(record=record)
+ super().__init__(record=record)
def __enter__(self):
for mod in self.modules:
@@ -2014,10 +2014,10 @@ class clear_and_catch_warnings(warnings.catch_warnings):
mod_reg = mod.__warningregistry__
self._warnreg_copies[mod] = mod_reg.copy()
mod_reg.clear()
- return super(clear_and_catch_warnings, self).__enter__()
+ return super().__enter__()
def __exit__(self, *exc_info):
- super(clear_and_catch_warnings, self).__exit__(*exc_info)
+ super().__exit__(*exc_info)
for mod in self.modules:
if hasattr(mod, '__warningregistry__'):
mod.__warningregistry__.clear()