Type annotations: Enable Image.filter to also accept Callable returning Filter.

This commit is contained in:
neiljp (Neil Pilgrim) 2017-08-19 17:19:13 -07:00 committed by Eric Soroos
parent cb535be9af
commit 0541e239d4

View File

@ -1184,7 +1184,7 @@ class Image(object):
return self._new(self.im.expand(xmargin, ymargin, 0)) return self._new(self.im.expand(xmargin, ymargin, 0))
def filter(self, filter): def filter(self, filter):
# type: (Filter) -> Image # type: (Union[Filter, Callable[[], Filter]]) -> Image
""" """
Filters this image using the given filter. For a list of Filters this image using the given filter. For a list of
available filters, see the :py:mod:`~PIL.ImageFilter` module. available filters, see the :py:mod:`~PIL.ImageFilter` module.