Skip to content

Commit

Permalink
Bump ruff to 0.9 and fix format/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Jan 13, 2025
1 parent 66009aa commit 06d455d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
exclude: miscellaneous/structures

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff-format
exclude: ^docs/.*
Expand All @@ -27,7 +27,7 @@ repos:
args: [--preserve-quotes]

- repo: https://github.com/sirosen/check-jsonschema
rev: 0.30.0
rev: 0.31.0
hooks:
- id: check-github-workflows

Expand Down
2 changes: 1 addition & 1 deletion aiidalab_widgets_base/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions tests/test_viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
8 changes: 4 additions & 4 deletions tests_notebooks/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 06d455d

Please sign in to comment.