mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 00:46:16 +03:00
Add type hints
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
008b28eb0c
commit
7c5d0b9284
|
@ -524,7 +524,7 @@ class Image:
|
|||
def mode(self):
|
||||
return self._mode
|
||||
|
||||
def _new(self, im: Image):
|
||||
def _new(self, im) -> Image:
|
||||
new = Image()
|
||||
new.im = im
|
||||
new._mode = im.mode
|
||||
|
@ -1347,9 +1347,7 @@ class Image:
|
|||
self.load()
|
||||
return self.im.getbbox(alpha_only)
|
||||
|
||||
def getcolors(
|
||||
self, maxcolors: int = 256
|
||||
) -> list[tuple[int, int | tuple[int, ...]]] | None:
|
||||
def getcolors(self, maxcolors: int = 256):
|
||||
"""
|
||||
Returns a list of colors used in this image.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user