From b017aa2ba5ce378a65adbe4d303342db6873c7dc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:02:58 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.8 → v0.5.4](https://github.com/astral-sh/ruff-pre-commit/compare/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 --- .pre-commit-config.yaml | 2 +- gustaf/helpers/data.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1d2516db..27b6e2eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: [ diff --git a/gustaf/helpers/data.py b/gustaf/helpers/data.py index 2b879ddf..00f27726 100644 --- a/gustaf/helpers/data.py +++ b/gustaf/helpers/data.py @@ -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