Skip to content

Commit 7c5d0b9

Browse files
hugovkradarhere
andauthored
Add type hints
Co-authored-by: Andrew Murray <[email protected]>
1 parent 008b28e commit 7c5d0b9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/PIL/Image.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def size(self) -> tuple[int, int]:
524524
def mode(self):
525525
return self._mode
526526

527-
def _new(self, im: Image):
527+
def _new(self, im) -> Image:
528528
new = Image()
529529
new.im = im
530530
new._mode = im.mode
@@ -1347,9 +1347,7 @@ def getbbox(self, *, alpha_only: bool = True) -> tuple[int, int, int, int]:
13471347
self.load()
13481348
return self.im.getbbox(alpha_only)
13491349

1350-
def getcolors(
1351-
self, maxcolors: int = 256
1352-
) -> list[tuple[int, int | tuple[int, ...]]] | None:
1350+
def getcolors(self, maxcolors: int = 256):
13531351
"""
13541352
Returns a list of colors used in this image.
13551353

0 commit comments

Comments
 (0)