mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-26 07:04:45 +03:00
Typing: resize -- ignore tuple manipulations
This commit is contained in:
parent
3ee774ede0
commit
83124c5ca8
|
@ -1830,12 +1830,15 @@ class Image(object):
|
||||||
):
|
):
|
||||||
raise ValueError("unknown resampling filter")
|
raise ValueError("unknown resampling filter")
|
||||||
|
|
||||||
size = tuple(size)
|
size = tuple(size) # type: ignore
|
||||||
|
# Typing note -- historically we've allowed Iterables of
|
||||||
|
# len==2 as sizes, but technically they're supposed to be
|
||||||
|
# 2-tuples.
|
||||||
|
|
||||||
if box is None:
|
if box is None:
|
||||||
box = (0, 0) + self.size
|
box = (0, 0) + self.size # type: ignore
|
||||||
else:
|
else:
|
||||||
box = tuple(box)
|
box = tuple(box) # type: ignore
|
||||||
|
|
||||||
if self.size == size and box == (0, 0) + self.size:
|
if self.size == size and box == (0, 0) + self.size:
|
||||||
return self.copy()
|
return self.copy()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user