From 365a4999a67edc87fb0b7199730854657a6cb736 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 16:46:08 +0100 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#346) 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.8.2 → v0.9.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.2...v0.9.2) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- aiida_registry/fetch_metadata.py | 4 ++-- aiida_registry/parse_pypi.py | 2 +- aiida_registry/test_install.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8fdd988c..f56fe674 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.8.2 + rev: v0.9.2 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] diff --git a/aiida_registry/fetch_metadata.py b/aiida_registry/fetch_metadata.py index 49fd33bd..8817e921 100644 --- a/aiida_registry/fetch_metadata.py +++ b/aiida_registry/fetch_metadata.py @@ -147,7 +147,7 @@ def complete_plugin_data(plugin_data: dict, fetch_pypi=True, fetch_pypi_wheel=Tr if "package_name" not in list(plugin_data.keys()): plugin_data["package_name"] = plugin_data["name"].replace("-", "_") - REPORTER.info(f'{plugin_data["package_name"]}') + REPORTER.info(f"{plugin_data['package_name']}") plugin_data["hosted_on"] = get_hosted_on(plugin_data["code_home"]) @@ -220,7 +220,7 @@ def complete_plugin_data(plugin_data: dict, fetch_pypi=True, fetch_pypi_wheel=Tr # run validations if plugin_data["name"] == "aiida-core" and plugin_data["metadata"].get("version"): - plugin_data["aiida_version"] = f'=={plugin_data["metadata"]["version"]}' + plugin_data["aiida_version"] = f"=={plugin_data['metadata']['version']}" if plugin_data.get("aiida_version") is None: REPORTER.warn( "AiiDA version not found", diff --git a/aiida_registry/parse_pypi.py b/aiida_registry/parse_pypi.py index a0b6f164..8d84e4e4 100644 --- a/aiida_registry/parse_pypi.py +++ b/aiida_registry/parse_pypi.py @@ -120,7 +120,7 @@ def get_pypi_metadata(package_name: str, parse_wheel=True) -> Optional[PypiData] except Exception as err: # pylint: disable=broad-except REPORTER.warn( - "Unable to read wheel file from PyPI release: " f"
{err}", + f"Unable to read wheel file from PyPI release:
{err}", check_id="W020", ) diff --git a/aiida_registry/test_install.py b/aiida_registry/test_install.py index 1001c3da..44f46984 100644 --- a/aiida_registry/test_install.py +++ b/aiida_registry/test_install.py @@ -76,7 +76,7 @@ def handle_error(process_result, message, check_id=None): error_message = process_result.output.decode("utf8") # the error_message is formatted as code block - REPORTER.error(f"{message}" f"
{error_message}", check_id=check_id) + REPORTER.error(f"{message}
{error_message}", check_id=check_id) raise ValueError(f"{message}\n{error_message}") return error_message @@ -120,7 +120,7 @@ def test_install_one_docker(container_image, plugin): user=user, ) install_package = container.exec_run( - f'pip install --constraint /tmp/pip-constraint.txt {plugin["pip_url"]}', + f"pip install --constraint /tmp/pip-constraint.txt {plugin['pip_url']}", user=user, )