From 3e53cc82b005b5d75309ed1d58a17ffcd4b94d61 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:57:47 +0000 Subject: [PATCH] Devops: Update pre-commit dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/python-jsonschema/check-jsonschema: 0.28.2 → 0.28.6](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.2...0.28.6) - [github.com/astral-sh/ruff-pre-commit: v0.4.1 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.1...v0.5.0) --- .pre-commit-config.yaml | 4 ++-- src/aiida/calculations/transfer.py | 2 +- src/aiida/engine/processes/functions.py | 2 +- src/aiida/orm/nodes/data/remote/base.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cad92cb781..185d5698fb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: exclude: *exclude_pre_commit_hooks - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.2 + rev: 0.28.6 hooks: - id: check-github-workflows @@ -37,7 +37,7 @@ repos: args: [--line-length=120, --fail-on-change] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.1 + rev: v0.5.0 hooks: - id: ruff-format exclude: &exclude_ruff > diff --git a/src/aiida/calculations/transfer.py b/src/aiida/calculations/transfer.py index 04290e0606..fae76aa5ed 100644 --- a/src/aiida/calculations/transfer.py +++ b/src/aiida/calculations/transfer.py @@ -55,7 +55,7 @@ def validate_instructions(instructions, _): return errmsg -def validate_transfer_inputs(inputs, _): +def validate_transfer_inputs(inputs, _ctx): """Check that the instructions dict and the source nodes are consistent""" source_nodes = inputs['source_nodes'] instructions = inputs['instructions'] diff --git a/src/aiida/engine/processes/functions.py b/src/aiida/engine/processes/functions.py index 11bd43946c..509e2d0258 100644 --- a/src/aiida/engine/processes/functions.py +++ b/src/aiida/engine/processes/functions.py @@ -85,7 +85,7 @@ def get_stack_size(size: int = 2) -> int: # type: ignore[return] """ frame = sys._getframe(size) try: - for size in itertools.count(size, 8): + for size in itertools.count(size, 8): # noqa: PLR1704 frame = frame.f_back.f_back.f_back.f_back.f_back.f_back.f_back.f_back # type: ignore[assignment,union-attr] except AttributeError: while frame: # type: ignore[truthy-bool] diff --git a/src/aiida/orm/nodes/data/remote/base.py b/src/aiida/orm/nodes/data/remote/base.py index 760924a725..9147a58d10 100644 --- a/src/aiida/orm/nodes/data/remote/base.py +++ b/src/aiida/orm/nodes/data/remote/base.py @@ -175,8 +175,8 @@ def _clean(self, transport=None): remote_dir = self.get_remote_path() if transport is None: - with self.get_authinfo().get_transport() as transport: - clean_remote(transport, remote_dir) + with self.get_authinfo().get_transport() as _transport: + clean_remote(_transport, remote_dir) else: if transport.hostname != self.computer.hostname: raise ValueError(