From 6560199e1f5c1c7515bc0769ecc5e452340e1dcc Mon Sep 17 00:00:00 2001 From: Muhamed Fazal PS Date: Tue, 7 Jul 2026 18:34:50 +0530 Subject: [PATCH] fix: remove list from putpixel value type annotation The putpixel method's value parameter was typed as accepting list[int], but the underlying C code only accepts tuple or int, causing a TypeError at runtime when a list is passed. Fixes #9584 --- src/PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 6bb1a6a4a46..960ba591164 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2164,7 +2164,7 @@ def putpalette( def putpixel( self, xy: tuple[int, int] | list[int], - value: float | tuple[int, ...] | list[int], + value: float | tuple[int, ...], ) -> None: """ Modifies the pixel at the given position. The color is given as