Skip to content

Commit

Permalink
Merge pull request #280 from DimitriPapadopoulos/PTC-W0060
Browse files Browse the repository at this point in the history
Implicit enumerate calls found
  • Loading branch information
FrancescAlted authored Oct 10, 2024
2 parents fddeb5e + f392909 commit a4493f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/blosc2/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def __post_init__(self):
if len(self.filters) > len(self.filters_meta):
raise ValueError("Number of filters cannot exceed number of filters meta")

for i in range(len(self.filters)):
if not isinstance(self.filters[i], blosc2.Filter):
for i, filter_i in enumerate(self.filters):
if not isinstance(filter_i, blosc2.Filter):
with contextlib.suppress(ValueError):
# User-defined filters may have no entries in Filter
self.filters[i] = blosc2.Filter(self.filters[i])
self.filters[i] = blosc2.Filter(filter_i)
if self.filters_meta[i] == 0 and self.filters[i] == blosc2.Filter.BYTEDELTA:
self.filters_meta[i] = self.typesize

Expand Down

0 comments on commit a4493f4

Please sign in to comment.