Skip to content

Commit 9c90338

Browse files
authored
Merge pull request h5py#2024 from mwtoews/pep-3135
MAINT: use super() as described by PEP 3135
2 parents 73b8fa6 + f46c2c4 commit 9c90338

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

examples/swmr_multiprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
class SwmrReader(Process):
2626
def __init__(self, event, fname, dsetname, timeout = 2.0):
27-
super(SwmrReader, self).__init__()
27+
super().__init__()
2828
self._event = event
2929
self._fname = fname
3030
self._dsetname = dsetname
@@ -54,7 +54,7 @@ def run(self):
5454

5555
class SwmrWriter(Process):
5656
def __init__(self, event, fname, dsetname):
57-
super(SwmrWriter, self).__init__()
57+
super().__init__()
5858
self._event = event
5959
self._fname = fname
6060
self._dsetname = dsetname

h5py/_hl/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def __init__(self, bind, *, readonly=False):
586586
"""
587587
if not isinstance(bind, h5d.DatasetID):
588588
raise ValueError("%s is not a DatasetID" % bind)
589-
super(Dataset, self).__init__(bind)
589+
super().__init__(bind)
590590

591591
self._dcpl = self.id.get_create_plist()
592592
self._dxpl = h5p.create(h5p.DATASET_XFER)

h5py/_hl/datatype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, bind):
4040
"""
4141
if not isinstance(bind, TypeID):
4242
raise ValueError("%s is not a TypeID" % bind)
43-
super(Datatype, self).__init__(bind)
43+
super().__init__(bind)
4444

4545
@with_phil
4646
def __repr__(self):

h5py/_hl/files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def __init__(self, name, mode='r', driver=None, libver=None, userblock_size=None
511511
else:
512512
self._libver = (libver, 'latest')
513513

514-
super(File, self).__init__(fid)
514+
super().__init__(fid)
515515

516516
def close(self):
517517
""" Close the file. All open objects become invalid """

h5py/_hl/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, bind):
3737
with phil:
3838
if not isinstance(bind, h5g.GroupID):
3939
raise ValueError("%s is not a GroupID" % bind)
40-
super(Group, self).__init__(bind)
40+
super().__init__(bind)
4141

4242

4343
_gcpl_crt_order = h5p.create(h5p.GROUP_CREATE)

h5py/tests/test_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ class TestNewLibver(TestCase):
435435

436436
@classmethod
437437
def setUpClass(cls):
438-
super(TestNewLibver, cls).setUpClass()
438+
super().setUpClass()
439439

440440
# Current latest library bound label
441441
if h5py.version.hdf5_version_tuple < (1, 11, 4):

h5py/tests/test_slicing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def test_write_noncompound(self):
321321
class TestMultiBlockSlice(BaseSlicing):
322322

323323
def setUp(self):
324-
super(TestMultiBlockSlice, self).setUp()
324+
super().setUp()
325325
self.arr = np.arange(10)
326326
self.dset = self.f.create_dataset('x', data=self.arr)
327327

0 commit comments

Comments
 (0)