From e304dc9f5a721eec92c2cc384c6a2df49221cf52 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 29 Aug 2026 19:52:49 +1000 Subject: [PATCH 1/2] Use None as mask default --- Tests/test_pyarrow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/test_pyarrow.py b/Tests/test_pyarrow.py index 2dfa440d181..62a890c074c 100644 --- a/Tests/test_pyarrow.py +++ b/Tests/test_pyarrow.py @@ -24,7 +24,7 @@ def _test_img_equals_pyarray( - img: Image.Image, arr: Any, mask: list[int] | None, elts_per_pixel: int = 1 + img: Image.Image, arr: Any, mask: list[int] | None = None, elts_per_pixel: int = 1 ) -> None: assert img.height * img.width * elts_per_pixel == len(arr) px = img.load() @@ -237,7 +237,7 @@ def test_fromarray_interleaved_to_array() -> None: arr = pyarrow.array(list(img.tobytes()), type=pyarrow.uint8()) borrowed = Image.fromarrow(arr, "RGBA", img.size) - _test_img_equals_pyarray(img, pyarrow.array(borrowed), None) # type: ignore[call-overload] + _test_img_equals_pyarray(img, pyarrow.array(borrowed)) # type: ignore[call-overload] @pytest.mark.parametrize( From 46e5115b0b59f52d9ba88dcaa20177df75306e8d Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 29 Aug 2026 19:53:54 +1000 Subject: [PATCH 2/2] Move ignored type hint to separate line --- Tests/test_pyarrow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/test_pyarrow.py b/Tests/test_pyarrow.py index 62a890c074c..c33c5a34ffd 100644 --- a/Tests/test_pyarrow.py +++ b/Tests/test_pyarrow.py @@ -237,7 +237,8 @@ def test_fromarray_interleaved_to_array() -> None: arr = pyarrow.array(list(img.tobytes()), type=pyarrow.uint8()) borrowed = Image.fromarrow(arr, "RGBA", img.size) - _test_img_equals_pyarray(img, pyarrow.array(borrowed)) # type: ignore[call-overload] + arr = pyarrow.array(borrowed) # type: ignore[call-overload] + _test_img_equals_pyarray(img, arr) @pytest.mark.parametrize(