From 58982c6081dcb578247106af5e5822b639025f9a Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 3 Apr 2025 18:50:54 +1100 Subject: [PATCH] Added type hints --- 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::