Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up testing linting deps #131

Merged
merged 5 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
Expand All @@ -29,14 +29,9 @@ jobs:
needs: lint
strategy:
matrix:
include:
- python: "3.8"
- python: "3.9"
- python: "3.10"
- python: "3.11"
- python: "3.12"
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install optimizers
run: |
sudo apt-get install -y jpegoptim pngquant gifsicle optipng libjpeg-progs webp
Expand Down Expand Up @@ -66,7 +61,7 @@ jobs:
needs: test

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_LATEST}}
Expand Down
8 changes: 3 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1
hooks:
- id: black
language_version: python3
args: ['--target-version', 'py37']

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.275'
rev: 'v0.1.2'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ heif = [

testing = [
"willow[pillow,wand,heif]",
"black==22.3.0",
"ruff==0.0.275",
"coverage[toml]>=7.2.7,<8.0",
"pre-commit>=3.4.0"
]
docs = [
"Sphinx>=7.0",
"sphinx-wagtail-theme==6.0.0",
"sphinx-wagtail-theme>=6.1.1,<7.0",
"sphinxcontrib-spelling>=8.0,<9.0",
"sphinx_copybutton>=0.5"
]
Expand Down
4 changes: 1 addition & 3 deletions willow/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ def get_image_classes(self, with_operation=None, available=None):

if not image_classes:
raise UnrecognisedOperationError(
"Could not find image class with the '{}' operation".format(
with_operation
)
f"Could not find image class with the '{with_operation}' operation"
)

if available:
Expand Down