From 2ab28d5084221f15e6917b1f928ec73701a8948a Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Sun, 20 Aug 2017 11:19:31 -0700 Subject: [PATCH] Type annotations: Allow Image.putpalette to accept ImagePalette. --- 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 e36c711dc..3e680d615 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -1640,7 +1640,7 @@ class Image(object): self.im.putdata(data, scale, offset) def putpalette(self, data, rawmode="RGB"): - # type: (Sequence[Union[int, bytes]], Mode) -> None + # type: (Union[ImagePalette.ImagePalette, Sequence[Union[int, bytes]]], Mode) -> None """ Attaches a palette to this image. The image must be a "P" or "L" image, and the palette sequence must contain 768 integer