Skip to content

Fix box parameter type of Pillow.PIL.Image.paste #8090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

eggplants
Copy link
Contributor

When I ran img.paste(cropped, box=(10.5, 10.5)) I got:

TypeError: 'float' object cannot be interpreted as an integer

So I think the box parameter's type should be not tuple[float, float] but tuple[int, int]. (same as _Box)

When executing `img.paste(cropped, box=(10.5, 10.5))`:
TypeError: 'float' object cannot be interpreted as an integer

So the `box` parameter's type should be not `tuple[float, float]` but `tuple[int, int]`. (same as `_Box`)
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra self-assigned this Jun 16, 2022
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JelleZijlstra JelleZijlstra merged commit c383e95 into python:master Jun 16, 2022
@eggplants eggplants deleted the fix_pillow_paste_box branch June 16, 2022 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants