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/f2py/tests/test_array_from_pyobj.py | |
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/f2py/tests/test_array_from_pyobj.py')
-rw-r--r-- | numpy/f2py/tests/test_array_from_pyobj.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/f2py/tests/test_array_from_pyobj.py b/numpy/f2py/tests/test_array_from_pyobj.py index c5757dba1..b719f2495 100644 --- a/numpy/f2py/tests/test_array_from_pyobj.py +++ b/numpy/f2py/tests/test_array_from_pyobj.py @@ -55,7 +55,7 @@ def flags2names(flags): return info -class Intent(object): +class Intent: def __init__(self, intent_list=[]): self.intent_list = intent_list[:] @@ -129,7 +129,7 @@ if ((intp().dtype.itemsize != 4 or clongdouble().dtype.alignment <= 8) and _cast_dict['CDOUBLE'] = _cast_dict['DOUBLE'] + ['CFLOAT', 'CDOUBLE'] -class Type(object): +class Type: _type_cache = {} def __new__(cls, name): @@ -190,7 +190,7 @@ class Type(object): return types -class Array(object): +class Array: def __init__(self, typ, dims, intent, obj): self.type = typ @@ -291,7 +291,7 @@ class Array(object): return obj_attr[0] == self.arr_attr[0] -class TestIntent(object): +class TestIntent: def test_in_out(self): assert_equal(str(intent.in_.out), 'intent(in,out)') @@ -302,7 +302,7 @@ class TestIntent(object): assert_(not intent.in_.is_intent('c')) -class TestSharedMemory(object): +class TestSharedMemory: num2seq = [1, 2] num23seq = [[1, 2, 3], [4, 5, 6]] |