Skip to content

Commit

Permalink
Fix: local scope variabel shadowing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
clemens-fricke committed Jul 24, 2024
1 parent a44b849 commit f978f2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gustaf/helpers/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,19 +520,19 @@ def _validate_len(self, value=None, raise_=True):

# here, check all saved values.
to_pop = []
for key, value in self._saved.items():
if len(value) != helpee_len:
for key, d_value in self._saved.items():
if len(d_value) != helpee_len:
valid = False

if not valid:
if raise_:
raise ValueError(
f"`{key}`-data len ({len(value)}) doesn't match "
f"`{key}`-data len ({len(d_value)}) doesn't match "
f"expected len ({helpee_len})"
)
else:
self._logd(
f"`{key}`-data len ({len(value)}) doesn't match "
f"`{key}`-data len ({len(d_value)}) doesn't match "
f"expected len ({helpee_len}). Deleting `{key}`."
)
# pop invalid data
Expand Down

0 comments on commit f978f2a

Please sign in to comment.