mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +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:
|
||||
box = (0, 0) + self.size
|
||||
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:
|
||||
return self.copy()
|
||||
|
@ -2268,7 +2268,7 @@ class Image:
|
|||
if box is None:
|
||||
box = (0, 0) + self.size
|
||||
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:
|
||||
return self.copy()
|
||||
|
|
Loading…
Reference in New Issue
Block a user