From 0541e239d4f82ea061e5e6b0044b0d80dae8373f 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. --- 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 bb77c8cf7..df96fb036 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -1184,7 +1184,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.