Skip to content

Commit 9eff9bb

Browse files
authored
Tidy up testing linting deps (#131)
* Update linting dependencies * Use actions/checkout@v4 in Github Actions * Bump sphinx-wagtail-theme dependency * Lint
1 parent f7c7b8d commit 9eff9bb

File tree

5 files changed

+11
-21
lines changed

5 files changed

+11
-21
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
1717

.github/workflows/test.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
lint:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323
- uses: actions/setup-python@v4
@@ -29,14 +29,9 @@ jobs:
2929
needs: lint
3030
strategy:
3131
matrix:
32-
include:
33-
- python: "3.8"
34-
- python: "3.9"
35-
- python: "3.10"
36-
- python: "3.11"
37-
- python: "3.12"
32+
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3833
steps:
39-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
4035
- name: Install optimizers
4136
run: |
4237
sudo apt-get install -y jpegoptim pngquant gifsicle optipng libjpeg-progs webp
@@ -66,7 +61,7 @@ jobs:
6661
needs: test
6762

6863
steps:
69-
- uses: actions/checkout@v3
64+
- uses: actions/checkout@v4
7065
- uses: actions/setup-python@v4
7166
with:
7267
python-version: ${{env.PYTHON_LATEST}}

.pre-commit-config.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
default_language_version:
22
python: python3
33
repos:
4-
- repo: https://github.com/psf/black
5-
rev: 23.3.0
4+
- repo: https://github.com/psf/black-pre-commit-mirror
5+
rev: 23.10.1
66
hooks:
77
- id: black
8-
language_version: python3
9-
args: ['--target-version', 'py37']
108

119
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: 'v0.0.275'
10+
rev: 'v0.1.2'
1311
hooks:
1412
- id: ruff
1513
args: [--fix, --exit-non-zero-on-fix]

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ heif = [
4040

4141
testing = [
4242
"willow[pillow,wand,heif]",
43-
"black==22.3.0",
44-
"ruff==0.0.275",
4543
"coverage[toml]>=7.2.7,<8.0",
44+
"pre-commit>=3.4.0"
4645
]
4746
docs = [
4847
"Sphinx>=7.0",
49-
"sphinx-wagtail-theme==6.0.0",
48+
"sphinx-wagtail-theme>=6.1.1,<7.0",
5049
"sphinxcontrib-spelling>=8.0,<9.0",
5150
"sphinx_copybutton>=0.5"
5251
]

willow/registry.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ def get_image_classes(self, with_operation=None, available=None):
157157

158158
if not image_classes:
159159
raise UnrecognisedOperationError(
160-
"Could not find image class with the '{}' operation".format(
161-
with_operation
162-
)
160+
f"Could not find image class with the '{with_operation}' operation"
163161
)
164162

165163
if available:

0 commit comments

Comments
 (0)