Skip to content

Commit 49fc9a3

Browse files
Init variable in the branch where it's used
1 parent 2cb5a38 commit 49fc9a3

File tree

1 file changed

+1
-2
lines changed
  • src/zarr/core/metadata

1 file changed

+1
-2
lines changed

src/zarr/core/metadata/v2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,10 @@ def parse_filters(data: object) -> tuple[Numcodec, ...] | None:
265265
"""
266266
Parse a potential tuple of filters
267267
"""
268-
out: list[Numcodec] = []
269-
270268
if data is None:
271269
return data
272270
if isinstance(data, Iterable):
271+
out: list[Numcodec] = []
273272
for idx, val in enumerate(data):
274273
if _is_numcodec(val):
275274
out.append(val)

0 commit comments

Comments
 (0)