From bda5d2d042d3c806b53ed75aa55f6c27aa2875b5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 17:24:10 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.20 → v0.16.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.20...v0.16.1) - [github.com/pre-commit/mirrors-clang-format: v22.1.5 → v22.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v22.1.5...v22.1.8) - [github.com/zizmorcore/zizmor-pre-commit: v1.26.1 → v1.29.0](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.26.1...v1.29.0) - [github.com/tox-dev/pyproject-fmt: v2.25.1 → v2.26.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.25.1...v2.26.0) - [github.com/tox-dev/tox-ini-fmt: 1.7.1 → 1.8.1](https://github.com/tox-dev/tox-ini-fmt/compare/1.7.1...1.8.1) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b0eaf56a3b..add5609f5ef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.20 + rev: v0.16.1 hooks: - id: ruff-check args: [--exit-non-zero-on-fix] @@ -24,7 +24,7 @@ repos: exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$|\.patch$) - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v22.1.5 + rev: v22.1.8 hooks: - id: clang-format types: [c] @@ -61,7 +61,7 @@ repos: - id: check-renovate - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.26.1 + rev: v1.29.0 hooks: - id: zizmor @@ -71,7 +71,7 @@ repos: - id: sphinx-lint - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.25.1 + rev: v2.26.0 hooks: - id: pyproject-fmt @@ -82,7 +82,7 @@ repos: additional_dependencies: [trove-classifiers>=2024.10.12] - repo: https://github.com/tox-dev/tox-ini-fmt - rev: 1.7.1 + rev: 1.8.1 hooks: - id: tox-ini-fmt From c855ceb3a6ba16a093f738b90ae46ebd43cb25b5 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 3 Aug 2026 20:35:04 +0300 Subject: [PATCH 2/2] Fix ISC004 Unparenthesized implicit string concatenation in collection --- .github/generate-sbom.py | 6 ++++-- Tests/test_deprecate.py | 12 ++++++++---- Tests/test_file_ppm.py | 6 ++++-- Tests/test_imagedraw.py | 6 ++++-- Tests/test_imagegrab.py | 10 ++++++---- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/generate-sbom.py b/.github/generate-sbom.py index 1154c433a1f..a674cb0f34d 100755 --- a/.github/generate-sbom.py +++ b/.github/generate-sbom.py @@ -88,8 +88,10 @@ def generate(version: str) -> dict: ("PIL._avif", "AVIF image format extension"), ( "PIL._imaging", - "Core image processing extension " - "(decode, encode, map, display, outline, path, libImaging)", + ( + "Core image processing extension " + "(decode, encode, map, display, outline, path, libImaging)" + ), ), ("PIL._imagingcms", "LittleCMS2 colour management extension"), ("PIL._imagingft", "FreeType font rendering extension"), diff --git a/Tests/test_deprecate.py b/Tests/test_deprecate.py index 5f2fa36eaa6..b19c19d7f3e 100644 --- a/Tests/test_deprecate.py +++ b/Tests/test_deprecate.py @@ -10,13 +10,17 @@ [ ( 14, - "Old thing is deprecated and will be removed in Pillow 14 " - r"\(2027-10-15\)\. Use new thing instead\.", + ( + "Old thing is deprecated and will be removed in Pillow 14 " + r"\(2027-10-15\)\. Use new thing instead\." + ), ), ( None, - r"Old thing is deprecated and will be removed in a future version\. " - r"Use new thing instead\.", + ( + r"Old thing is deprecated and will be removed in a future version\. " + r"Use new thing instead\." + ), ), ], ) diff --git a/Tests/test_file_ppm.py b/Tests/test_file_ppm.py index d0b1cbf8e74..2e9937559ad 100644 --- a/Tests/test_file_ppm.py +++ b/Tests/test_file_ppm.py @@ -59,8 +59,10 @@ def test_sanity() -> None: ), # P6 with maxval > 255 ( - b"P6 3 1 257 \x00\x00\x00\x01\x00\x02" - b"\x00\x80\x00\x81\x00\x82\x01\x00\x01\x01\xff\xff", + ( + b"P6 3 1 257 \x00\x00\x00\x01\x00\x02" + b"\x00\x80\x00\x81\x00\x82\x01\x00\x01\x01\xff\xff" + ), "RGB", ( (0, 1, 2), diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py index e017e7a97de..680a68c302b 100644 --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -1670,8 +1670,10 @@ def test_compute_regular_polygon_vertices( (50, 50, 100, 100), 0, ValueError, - "bounding_circle should contain 2D coordinates " - r"and a radius \(e.g. \(x, y, r\) or \(\(x, y\), r\) \)", + ( + "bounding_circle should contain 2D coordinates " + r"and a radius \(e.g. \(x, y, r\) or \(\(x, y\), r\) \)" + ), ), ( 3, diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index 791628142de..b3db212563d 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -75,10 +75,12 @@ def test_grab_handle(self) -> None: [ "osascript", "-e", - 'tell application "Finder"\n' - 'open ("/" as POSIX file)\n' - "get id of front window\n" - "end tell", + ( + 'tell application "Finder"\n' + 'open ("/" as POSIX file)\n' + "get id of front window\n" + "end tell" + ), ], stdout=subprocess.PIPE, )