Skip to content

Commit de8154e

Browse files
Unnecessary None provided as default
1 parent a2bdbe5 commit de8154e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

numcodecs/zarr3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def __init__(self, **codec_config: JSON) -> None:
271271
super().__init__(**codec_config)
272272

273273
def evolve_from_array_spec(self, array_spec: ArraySpec) -> Shuffle:
274-
if self.codec_config.get("elementsize", None) is None:
274+
if self.codec_config.get("elementsize") is None:
275275
return Shuffle(**{**self.codec_config, "elementsize": array_spec.dtype.itemsize})
276276
return self # pragma: no cover
277277

@@ -308,7 +308,7 @@ def resolve_metadata(self, chunk_spec: ArraySpec) -> ArraySpec:
308308
return chunk_spec
309309

310310
def evolve_from_array_spec(self, array_spec: ArraySpec) -> FixedScaleOffset:
311-
if self.codec_config.get("dtype", None) is None:
311+
if self.codec_config.get("dtype") is None:
312312
return FixedScaleOffset(**{**self.codec_config, "dtype": str(array_spec.dtype)})
313313
return self
314314

@@ -321,7 +321,7 @@ def __init__(self, **codec_config: JSON) -> None:
321321
super().__init__(**codec_config)
322322

323323
def evolve_from_array_spec(self, array_spec: ArraySpec) -> Quantize:
324-
if self.codec_config.get("dtype", None) is None:
324+
if self.codec_config.get("dtype") is None:
325325
return Quantize(**{**self.codec_config, "dtype": str(array_spec.dtype)})
326326
return self
327327

@@ -356,7 +356,7 @@ def resolve_metadata(self, chunk_spec: ArraySpec) -> ArraySpec:
356356
return replace(chunk_spec, dtype=np.dtype(self.codec_config["encode_dtype"])) # type: ignore[arg-type]
357357

358358
def evolve_from_array_spec(self, array_spec: ArraySpec) -> AsType:
359-
if self.codec_config.get("decode_dtype", None) is None:
359+
if self.codec_config.get("decode_dtype") is None:
360360
return AsType(**{**self.codec_config, "decode_dtype": str(array_spec.dtype)})
361361
return self
362362

0 commit comments

Comments
 (0)