From 9f4195752d2231b34909c95fa70d716d4c664491 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Thu, 3 Apr 2025 21:24:37 +1100 Subject: [PATCH] Added type hints (#8867) --- src/PIL/Image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 807814c02..88ea6f3b5 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -3326,7 +3326,9 @@ def fromarray(obj: SupportsArrayInterface, mode: str | None = None) -> Image: return frombuffer(mode, size, obj, "raw", rawmode, 0, 1) -def fromarrow(obj: SupportsArrowArrayInterface, mode, size) -> Image: +def fromarrow( + obj: SupportsArrowArrayInterface, mode: str, size: tuple[int, int] +) -> Image: """Creates an image with zero-copy shared memory from an object exporting the arrow_c_array interface protocol::