Skip to content

Commit 308cc25

Browse files
Unnecessary None provided as default (#708)
Co-authored-by: Davis Bennett <[email protected]>
1 parent 2e0f950 commit 308cc25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

numcodecs/zarr3.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class LZMA(_NumcodecsBytesBytesCodec, codec_name="lzma"):
223223

224224
class Shuffle(_NumcodecsBytesBytesCodec, codec_name="shuffle"):
225225
def evolve_from_array_spec(self, array_spec: ArraySpec) -> Shuffle:
226-
if self.codec_config.get("elementsize", None) is None:
226+
if self.codec_config.get("elementsize") is None:
227227
return Shuffle(**{**self.codec_config, "elementsize": array_spec.dtype.itemsize})
228228
return self # pragma: no cover
229229

@@ -247,7 +247,7 @@ def resolve_metadata(self, chunk_spec: ArraySpec) -> ArraySpec:
247247
return chunk_spec
248248

249249
def evolve_from_array_spec(self, array_spec: ArraySpec) -> FixedScaleOffset:
250-
if self.codec_config.get("dtype", None) is None:
250+
if self.codec_config.get("dtype") is None:
251251
return FixedScaleOffset(**{**self.codec_config, "dtype": str(array_spec.dtype)})
252252
return self
253253

@@ -257,7 +257,7 @@ def __init__(self, **codec_config: JSON) -> None:
257257
super().__init__(**codec_config)
258258

259259
def evolve_from_array_spec(self, array_spec: ArraySpec) -> Quantize:
260-
if self.codec_config.get("dtype", None) is None:
260+
if self.codec_config.get("dtype") is None:
261261
return Quantize(**{**self.codec_config, "dtype": str(array_spec.dtype)})
262262
return self
263263

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

282282
def evolve_from_array_spec(self, array_spec: ArraySpec) -> AsType:
283-
if self.codec_config.get("decode_dtype", None) is None:
283+
if self.codec_config.get("decode_dtype") is None:
284284
return AsType(**{**self.codec_config, "decode_dtype": str(array_spec.dtype)})
285285
return self
286286

0 commit comments

Comments
 (0)