diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2020-01-05 00:53:30 -0500 |
|---|---|---|
| committer | Warren Weckesser <warren.weckesser@gmail.com> | 2020-01-05 00:53:30 -0500 |
| commit | c31cc36a8a814ed4844a2a553454185601914a5a (patch) | |
| tree | adb28a762dc0985eed669db75b564b3f5c3bfbcc /numpy/testing/_private | |
| parent | c1f1bc9ce8e4e2936e80d9bfafc3d8e03237a84b (diff) | |
| download | numpy-c31cc36a8a814ed4844a2a553454185601914a5a.tar.gz | |
MAINT: Remove implicit inheritance from object class (#15236)
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
Diffstat (limited to 'numpy/testing/_private')
| -rw-r--r-- | numpy/testing/_private/noseclasses.py | 2 | ||||
| -rw-r--r-- | numpy/testing/_private/nosetester.py | 2 | ||||
| -rw-r--r-- | numpy/testing/_private/parameterized.py | 4 | ||||
| -rw-r--r-- | numpy/testing/_private/utils.py | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/numpy/testing/_private/noseclasses.py b/numpy/testing/_private/noseclasses.py index 7cad24620..493bacfdd 100644 --- a/numpy/testing/_private/noseclasses.py +++ b/numpy/testing/_private/noseclasses.py @@ -266,7 +266,7 @@ class NumpyDoctest(npd.Doctest): return npd.Doctest.wantFile(self, file) -class Unplugger(object): +class Unplugger: """ Nose plugin to remove named plugin late in loading By default it removes the "doctest" plugin. diff --git a/numpy/testing/_private/nosetester.py b/numpy/testing/_private/nosetester.py index 6226eeb3c..a874321cc 100644 --- a/numpy/testing/_private/nosetester.py +++ b/numpy/testing/_private/nosetester.py @@ -110,7 +110,7 @@ def run_module_suite(file_to_run=None, argv=None): nose.run(argv=argv, addplugins=[KnownFailurePlugin()]) -class NoseTester(object): +class NoseTester: """ Nose test runner. diff --git a/numpy/testing/_private/parameterized.py b/numpy/testing/_private/parameterized.py index 2134cca88..dbfb4807c 100644 --- a/numpy/testing/_private/parameterized.py +++ b/numpy/testing/_private/parameterized.py @@ -293,10 +293,10 @@ def detect_runner(): _test_runner_guess = None return _test_runner_guess -class parameterized(object): +class parameterized: """ Parameterize a test case:: - class TestInt(object): + class TestInt: @parameterized([ ("A", 10), ("F", 15), diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py index 1e118b538..9e5a2eb2a 100644 --- a/numpy/testing/_private/utils.py +++ b/numpy/testing/_private/utils.py @@ -2001,7 +2001,7 @@ class clear_and_catch_warnings(warnings.catch_warnings): mod.__warningregistry__.update(self._warnreg_copies[mod]) -class suppress_warnings(object): +class suppress_warnings: """ Context manager and decorator doing much the same as ``warnings.catch_warnings``. |
