Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 18, 2024
1 parent efb647f commit 8bfeddb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions Tests/test_image_resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,7 @@ def resize(mode: str, size: tuple[int, int] | list[int]) -> None:

def resize_scale(mode: str, scale: float) -> None:
img = hopper(mode)
size = (
int(self.width * scale),
int(self.height * scale)
)
size = (int(self.width * scale), int(self.height * scale))
out = img.resize(img.size, scale=scale)
assert out.mode == mode
assert out.size == tuple(size)
Expand Down
5 changes: 1 addition & 4 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -2292,10 +2292,7 @@ def resize(
raise ValueError(msg)

if scale:
size = (
int(size[0] * scale),
int(size[1] * scale)
)
size = (int(size[0] * scale), int(size[1] * scale))

self.load()
if box is None:
Expand Down

0 comments on commit 8bfeddb

Please sign in to comment.