Skip to content

Commit

Permalink
Merge pull request h5py#2024 from mwtoews/pep-3135
Browse files Browse the repository at this point in the history
MAINT: use super() as described by PEP 3135
  • Loading branch information
takluyver authored Jan 8, 2022
2 parents 73b8fa6 + f46c2c4 commit 9c90338
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/swmr_multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

class SwmrReader(Process):
def __init__(self, event, fname, dsetname, timeout = 2.0):
super(SwmrReader, self).__init__()
super().__init__()
self._event = event
self._fname = fname
self._dsetname = dsetname
Expand Down Expand Up @@ -54,7 +54,7 @@ def run(self):

class SwmrWriter(Process):
def __init__(self, event, fname, dsetname):
super(SwmrWriter, self).__init__()
super().__init__()
self._event = event
self._fname = fname
self._dsetname = dsetname
Expand Down
2 changes: 1 addition & 1 deletion h5py/_hl/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def __init__(self, bind, *, readonly=False):
"""
if not isinstance(bind, h5d.DatasetID):
raise ValueError("%s is not a DatasetID" % bind)
super(Dataset, self).__init__(bind)
super().__init__(bind)

self._dcpl = self.id.get_create_plist()
self._dxpl = h5p.create(h5p.DATASET_XFER)
Expand Down
2 changes: 1 addition & 1 deletion h5py/_hl/datatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, bind):
"""
if not isinstance(bind, TypeID):
raise ValueError("%s is not a TypeID" % bind)
super(Datatype, self).__init__(bind)
super().__init__(bind)

@with_phil
def __repr__(self):
Expand Down
2 changes: 1 addition & 1 deletion h5py/_hl/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def __init__(self, name, mode='r', driver=None, libver=None, userblock_size=None
else:
self._libver = (libver, 'latest')

super(File, self).__init__(fid)
super().__init__(fid)

def close(self):
""" Close the file. All open objects become invalid """
Expand Down
2 changes: 1 addition & 1 deletion h5py/_hl/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, bind):
with phil:
if not isinstance(bind, h5g.GroupID):
raise ValueError("%s is not a GroupID" % bind)
super(Group, self).__init__(bind)
super().__init__(bind)


_gcpl_crt_order = h5p.create(h5p.GROUP_CREATE)
Expand Down
2 changes: 1 addition & 1 deletion h5py/tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ class TestNewLibver(TestCase):

@classmethod
def setUpClass(cls):
super(TestNewLibver, cls).setUpClass()
super().setUpClass()

# Current latest library bound label
if h5py.version.hdf5_version_tuple < (1, 11, 4):
Expand Down
2 changes: 1 addition & 1 deletion h5py/tests/test_slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def test_write_noncompound(self):
class TestMultiBlockSlice(BaseSlicing):

def setUp(self):
super(TestMultiBlockSlice, self).setUp()
super().setUp()
self.arr = np.arange(10)
self.dset = self.f.create_dataset('x', data=self.arr)

Expand Down

0 comments on commit 9c90338

Please sign in to comment.