Skip to content

Commit 72a185a

Browse files
Apply ruff/flake8-comprehensions rule C409
C409 Unnecessary list comprehension passed to `tuple()` (rewrite as a generator)
1 parent 058f580 commit 72a185a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zarr/codecs/sharding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ def to_dict(self) -> dict[str, JSON]:
380380
"name": "sharding_indexed",
381381
"configuration": {
382382
"chunk_shape": self.chunk_shape,
383-
"codecs": tuple([s.to_dict() for s in self.codecs]),
384-
"index_codecs": tuple([s.to_dict() for s in self.index_codecs]),
383+
"codecs": tuple(s.to_dict() for s in self.codecs),
384+
"index_codecs": tuple(s.to_dict() for s in self.index_codecs),
385385
"index_location": self.index_location.value,
386386
},
387387
}

0 commit comments

Comments
 (0)