From 3b73acb06be3a9f0cb4840fe103dc89f07d0aa57 Mon Sep 17 00:00:00 2001 From: Luca Chiodini Date: Fri, 7 Jan 2022 17:08:30 +0100 Subject: [PATCH] Pillow: Image fixes (#6848) * Fix return type of `Image.transform()`. * Add animation attributes to `Image`. --- stubs/Pillow/PIL/Image.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stubs/Pillow/PIL/Image.pyi b/stubs/Pillow/PIL/Image.pyi index 6367237fd..fddbb2385 100644 --- a/stubs/Pillow/PIL/Image.pyi +++ b/stubs/Pillow/PIL/Image.pyi @@ -110,6 +110,8 @@ class Image: info: dict[Any, Any] readonly: int pyaccess: Any + is_animated: bool # not present on all Image objects + n_frames: int # not present on all Image objects @property def width(self) -> int: ... @property @@ -209,7 +211,7 @@ class Image: resample: _Resample = ..., fill: int = ..., fillcolor: _Color | int | None = ..., - ) -> None: ... + ) -> Image: ... def transpose(self, method: Literal[0, 1, 2, 3, 4, 5, 6]) -> Image: ... def effect_spread(self, distance: int) -> Image: ... def toqimage(self): ...