From a3e3639a59ffaf33430b08b089da1eedf04286ab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 24 Aug 2024 11:27:40 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- Tests/test_file_webp.py | 3 ++- src/_webp.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Tests/test_file_webp.py b/Tests/test_file_webp.py index 4a048f2c2..247fc6021 100644 --- a/Tests/test_file_webp.py +++ b/Tests/test_file_webp.py @@ -164,7 +164,8 @@ class TestFileWebp: with pytest.raises(ValueError) as e: im.save(temp_file) assert ( - str(e.value) == "encoding error 5: Image size exceeds WebP limit of 16383 pixels" + str(e.value) + == "encoding error 5: Image size exceeds WebP limit of 16383 pixels" ) def test_WebPEncode_with_invalid_args(self) -> None: diff --git a/src/_webp.c b/src/_webp.c index b4cf9c329..f59ad3036 100644 --- a/src/_webp.c +++ b/src/_webp.c @@ -676,7 +676,9 @@ WebPEncode_wrapper(PyObject *self, PyObject *args) { char message[50] = ""; if (error_code == VP8_ENC_ERROR_BAD_DIMENSION) { sprintf( - message, ": Image size exceeds WebP limit of %d pixels", WEBP_MAX_DIMENSION + message, + ": Image size exceeds WebP limit of %d pixels", + WEBP_MAX_DIMENSION ); } PyErr_Format(PyExc_ValueError, "encoding error %d%s", error_code, message);