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/.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 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, )