mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
More Python 3.8 compatibility
This commit is contained in:
parent
7ae8d37138
commit
296050f382
|
@ -2210,7 +2210,7 @@ class Image:
|
||||||
if box is None:
|
if box is None:
|
||||||
box = (0, 0) + self.size
|
box = (0, 0) + self.size
|
||||||
else:
|
else:
|
||||||
box = cast(tuple[float, float, float, float], tuple(box))
|
box = cast("tuple[float, float, float, float]", tuple(box))
|
||||||
|
|
||||||
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()
|
||||||
|
@ -2268,7 +2268,7 @@ class Image:
|
||||||
if box is None:
|
if box is None:
|
||||||
box = (0, 0) + self.size
|
box = (0, 0) + self.size
|
||||||
else:
|
else:
|
||||||
box = cast(tuple[int, int, int, int], tuple(box))
|
box = cast("tuple[int, int, int, int]", tuple(box))
|
||||||
|
|
||||||
if factor == (1, 1) and box == (0, 0) + self.size:
|
if factor == (1, 1) and box == (0, 0) + self.size:
|
||||||
return self.copy()
|
return self.copy()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user