mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fix box parameter type of Pillow.PIL.Image.paste (#8090)
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`)
This commit is contained in:
@@ -163,7 +163,7 @@ class Image:
|
||||
def getprojection(self) -> tuple[list[int], list[int]]: ...
|
||||
def histogram(self, mask: Image | None = ..., extrema: tuple[int, int] | tuple[float, float] | None = ...) -> list[int]: ...
|
||||
def entropy(self, mask: Image | None = ..., extrema: tuple[int, int] | tuple[float, float] | None = ...) -> float: ...
|
||||
def paste(self, im: Image | _Color, box: tuple[float, float] | _Box | None = ..., mask: Image | None = ...) -> None: ...
|
||||
def paste(self, im: Image | _Color, box: tuple[int, int] | _Box | None = ..., mask: Image | None = ...) -> None: ...
|
||||
def alpha_composite(self, im: Image, dest: tuple[int, int] = ..., source: tuple[int, int] = ...) -> None: ...
|
||||
def point(self, lut, mode: _Mode | None = ...) -> Image: ...
|
||||
def putalpha(self, alpha: Image | int) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user