Skip to content

Commit 82ce2f8

Browse files
Apply Pylint rule W0246 (useless-parent-delegation)
Useless parent or super() delegation in method '__init__'
1 parent 3aa5f1a commit 82ce2f8

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/zarr/codecs/numcodecs/_codecs.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ def __repr__(self) -> str:
137137

138138

139139
class _NumcodecsBytesBytesCodec(_NumcodecsCodec, BytesBytesCodec):
140-
def __init__(self, **codec_config: JSON) -> None:
141-
super().__init__(**codec_config)
142-
143140
async def _decode_single(self, chunk_data: Buffer, chunk_spec: ArraySpec) -> Buffer:
144141
return await asyncio.to_thread(
145142
as_numpy_array_wrapper,
@@ -159,9 +156,6 @@ async def _encode_single(self, chunk_data: Buffer, chunk_spec: ArraySpec) -> Buf
159156

160157

161158
class _NumcodecsArrayArrayCodec(_NumcodecsCodec, ArrayArrayCodec):
162-
def __init__(self, **codec_config: JSON) -> None:
163-
super().__init__(**codec_config)
164-
165159
async def _decode_single(self, chunk_data: NDBuffer, chunk_spec: ArraySpec) -> NDBuffer:
166160
chunk_ndarray = chunk_data.as_ndarray_like()
167161
out = await asyncio.to_thread(self._codec.decode, chunk_ndarray)
@@ -174,9 +168,6 @@ async def _encode_single(self, chunk_data: NDBuffer, chunk_spec: ArraySpec) -> N
174168

175169

176170
class _NumcodecsArrayBytesCodec(_NumcodecsCodec, ArrayBytesCodec):
177-
def __init__(self, **codec_config: JSON) -> None:
178-
super().__init__(**codec_config)
179-
180171
async def _decode_single(self, chunk_data: Buffer, chunk_spec: ArraySpec) -> NDBuffer:
181172
chunk_bytes = chunk_data.to_bytes()
182173
out = await asyncio.to_thread(self._codec.decode, chunk_bytes)
@@ -253,9 +244,6 @@ def evolve_from_array_spec(self, array_spec: ArraySpec) -> FixedScaleOffset:
253244

254245

255246
class Quantize(_NumcodecsArrayArrayCodec, codec_name="quantize"):
256-
def __init__(self, **codec_config: JSON) -> None:
257-
super().__init__(**codec_config)
258-
259247
def evolve_from_array_spec(self, array_spec: ArraySpec) -> Quantize:
260248
if self.codec_config.get("dtype") is None:
261249
dtype = array_spec.dtype.to_native_dtype()

0 commit comments

Comments
 (0)