Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#213)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.8 → v0.5.4](astral-sh/ruff-pre-commit@v0.4.8...v0.5.4)

* Fix: local scope variabel shadowing fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: clemens.fricke <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and clemens-fricke authored Jul 24, 2024
1 parent e1a12b5 commit b017aa2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
args: [--line-length=79]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
rev: v0.5.4
hooks:
- id: ruff
args: [
Expand Down
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 b017aa2

Please sign in to comment.