mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-07 15:10:49 +03:00
Typing Lint
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
9d584a1014
commit
2b88b1c49d
|
@ -3361,7 +3361,8 @@ def fromarray(obj: SupportsArrayInterface, mode: str | None = None) -> Image:
|
||||||
|
|
||||||
def fromarrow(obj: SupportsArrowArrayIngerface, mode, size) -> ImageFile.ImageFile:
|
def fromarrow(obj: SupportsArrowArrayIngerface, mode, size) -> ImageFile.ImageFile:
|
||||||
if not hasattr(obj, "__arrow_c_array__"):
|
if not hasattr(obj, "__arrow_c_array__"):
|
||||||
raise ValueError("arrow_c_array interface not found")
|
msg = "arrow_c_array interface not found"
|
||||||
|
raise ValueError(msg)
|
||||||
|
|
||||||
(schema_capsule, array_capsule) = obj.__arrow_c_array__()
|
(schema_capsule, array_capsule) = obj.__arrow_c_array__()
|
||||||
_im = core.new_arrow(mode, size, schema_capsule, array_capsule)
|
_im = core.new_arrow(mode, size, schema_capsule, array_capsule)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user