From 4c7520065e6b29ca2d62e8d9972e9b29d8e4ea3c Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:38:15 +0100 Subject: [PATCH] Apply ruff/flake8-simplify rule SIM118 SIM118 Use `key in dict` instead of `key in dict.keys()` --- src/zarr/core/group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zarr/core/group.py b/src/zarr/core/group.py index 46f37700e..c838832b7 100644 --- a/src/zarr/core/group.py +++ b/src/zarr/core/group.py @@ -1230,7 +1230,7 @@ def _members_consolidated( # we kind of just want the top-level keys. if consolidated_metadata is not None: - for key in consolidated_metadata.metadata.keys(): + for key in consolidated_metadata.metadata: obj = self._getitem_consolidated( self.store_path, key, prefix=self.name ) # Metadata -> Group/Array