From 0ac87cc06be1682d5f91319c69ba5631ba10d374 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. --- PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/Image.py b/PIL/Image.py index 96ab09efc..69c303f15 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1626,7 +1626,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