diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 0fec3836..035e9933 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -15,7 +15,8 @@ jobs: steps: - uses: actions/checkout@v4 - - run: python -Im pip install --user ruff + # keep in sync with .pre-commit-config.yaml + - run: python -Im pip install --user ruff==0.4.8 - name: Run ruff working-directory: . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b113f7fb..f1dff06a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -13,7 +13,8 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.3.2' + # keep in sync with .github/workflows/ruff.yml + rev: 'v0.4.8' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/wagtail_localize/modeladmin/tests.py b/wagtail_localize/modeladmin/tests.py index d3103849..7b22802a 100644 --- a/wagtail_localize/modeladmin/tests.py +++ b/wagtail_localize/modeladmin/tests.py @@ -214,11 +214,9 @@ def test_button_helper_getter(self): def test_get_templates(self): def result(action): return [ - "wagtail_localize/modeladmin/wagtail_localize_test/testmodel/translatable_%s.html" - % action, - "wagtail_localize/modeladmin/wagtail_localize_test/translatable_%s.html" - % action, - "wagtail_localize/modeladmin/translatable_%s.html" % action, + f"wagtail_localize/modeladmin/wagtail_localize_test/testmodel/translatable_{action}.html", + f"wagtail_localize/modeladmin/wagtail_localize_test/translatable_{action}.html", + f"wagtail_localize/modeladmin/translatable_{action}.html", ] self.assertEqual(self.model_admin.get_templates("index"), result("index"))