Skip to content

Commit

Permalink
Redundant list comprehension can be replaced using generator (#2829)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos authored Feb 14, 2025
1 parent 99621ec commit 47003d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zarr/core/metadata/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def _default_fill_value(dtype: np.dtype[Any]) -> Any:
return dtype.type("nat")
elif dtype.kind == "V":
if dtype.fields is not None:
default = tuple([_default_fill_value(field[0]) for field in dtype.fields.values()])
default = tuple(_default_fill_value(field[0]) for field in dtype.fields.values())
return np.array([default], dtype=dtype)
else:
return np.zeros(1, dtype=dtype)
Expand Down

0 comments on commit 47003d7

Please sign in to comment.