From 8856c4a9a66022f4be2ee521d8124abcea036e23 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Sat, 19 Aug 2017 17:19:13 -0700 Subject: [PATCH] Type annotations: Enable Image.filter to also accept Callable returning Filter. --- PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/Image.py b/PIL/Image.py index 8a103858b..a4024e1f1 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1166,7 +1166,7 @@ class Image(object): return self._new(self.im.expand(xmargin, ymargin, 0)) def filter(self, filter): - # type: (Filter) -> Image + # type: (Union[Filter, Callable[[], Filter]]) -> Image """ Filters this image using the given filter. For a list of available filters, see the :py:mod:`~PIL.ImageFilter` module.