From 35c639a7f6ae5c334b5decbfca141cafd3c8ce6b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:34:35 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#659) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.9...v0.9.1) - [github.com/sirosen/check-jsonschema: 0.29.3 → 0.31.0](https://github.com/sirosen/check-jsonschema/compare/0.29.3...0.31.0) - [github.com/kynan/nbstripout: 0.7.1 → 0.8.1](https://github.com/kynan/nbstripout/compare/0.7.1...0.8.1) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel Hollas --- .pre-commit-config.yaml | 6 +++--- aiidalab_widgets_base/__init__.py | 6 +++--- aiidalab_widgets_base/wizard.py | 2 +- tests/test_viewers.py | 6 +++--- tests_notebooks/conftest.py | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e5d30f0ad..20d560d2f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: exclude: miscellaneous/structures - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 + rev: v0.9.1 hooks: - id: ruff-format exclude: ^docs/.* @@ -27,11 +27,11 @@ repos: args: [--preserve-quotes] - repo: https://github.com/sirosen/check-jsonschema - rev: 0.29.3 + rev: 0.31.0 hooks: - id: check-github-workflows - repo: https://github.com/kynan/nbstripout - rev: 0.7.1 + rev: 0.8.1 hooks: - id: nbstripout diff --git a/aiidalab_widgets_base/__init__.py b/aiidalab_widgets_base/__init__.py index 36459f67b..74e189338 100644 --- a/aiidalab_widgets_base/__init__.py +++ b/aiidalab_widgets_base/__init__.py @@ -91,13 +91,13 @@ def is_running_in_jupyter(): __all__ = [ "AiidaNodeViewWidget", - "BasicStructureEditor", "BasicCellEditor", + "BasicStructureEditor", + "CodQueryWidget", "CodeDatabaseWidget", "CodeDropdown", - "CodQueryWidget", - "ComputerDatabaseWidget", "ComputationalResourcesWidget", + "ComputerDatabaseWidget", "ComputerDropdownWidget", "ElnConfigureWidget", "ElnExportWidget", diff --git a/aiidalab_widgets_base/wizard.py b/aiidalab_widgets_base/wizard.py index 0c633683d..e1f0fc7dd 100644 --- a/aiidalab_widgets_base/wizard.py +++ b/aiidalab_widgets_base/wizard.py @@ -160,7 +160,7 @@ def show_header(self, value): def _update_titles(self): for i, (title, widget) in enumerate(zip(self.titles, self.accordion.children)): icon = self.ICONS.get(widget.state, str(widget.state).upper()) - self.accordion.set_title(i, f"{icon} Step {i+1}: {title}") + self.accordion.set_title(i, f"{icon} Step {i + 1}: {title}") def _consider_auto_advance(self, _=None): """Determine whether the app should automatically advance to the next step. diff --git a/tests/test_viewers.py b/tests/test_viewers.py index 203f146c5..533a4a703 100644 --- a/tests/test_viewers.py +++ b/tests/test_viewers.py @@ -301,7 +301,7 @@ def __init__(self, node=None): # Load the viewer widget for the generated process node. viewer = viewers.viewer(process) # Verify that the loaded viewer is the correct type and is associated with the intended node. - assert isinstance( - viewer, AbcViewer - ), "Viewer is not an instance of the expected viewer class." + assert isinstance(viewer, AbcViewer), ( + "Viewer is not an instance of the expected viewer class." + ) assert viewer.node == process, "Viewer's node does not match the test process node." diff --git a/tests_notebooks/conftest.py b/tests_notebooks/conftest.py index 41dfe9d08..207e46628 100644 --- a/tests_notebooks/conftest.py +++ b/tests_notebooks/conftest.py @@ -5,7 +5,7 @@ import pytest import requests import selenium.webdriver.support.expected_conditions as ec -from requests.exceptions import ConnectionError +from requests.exceptions import ConnectionError # noqa: A004 from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait @@ -77,9 +77,9 @@ def notebook_service(docker_ip, docker_services, aiidalab_exec): output = aiidalab_exec("verdi --version").decode("utf-8").strip() after_version = output.split(" ")[-1] - assert ( - before_version == after_version - ), f"aiida-core version was changed from {before_version} to {after_version}." + assert before_version == after_version, ( + f"aiida-core version was changed from {before_version} to {after_version}." + ) # `port_for` takes a container port and returns the corresponding host port port = docker_services.port_for("aiidalab", 8888)