Type annotations: Allow Image.putpalette to accept ImagePalette.

This commit is contained in:
neiljp (Neil Pilgrim) 2017-08-20 11:19:31 -07:00
parent 9112e3f4b1
commit 0ac87cc06b

View File

@ -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