Image will never be None (#9512)

This commit is contained in:
Hugo van Kemenade 2026-03-30 18:49:06 +03:00 committed by GitHub
commit 8d801bcafa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -112,8 +112,6 @@ def test_to_array(mode: str, dtype: pyarrow.DataType, mask: list[int] | None) ->
reloaded = Image.fromarrow(arr, mode, img.size)
assert reloaded
assert_image_equal(img, reloaded)

View File

@ -110,7 +110,7 @@ class ImageFont:
except Exception:
pass
else:
if image and image.mode in ("1", "L"):
if image.mode in ("1", "L"):
break
else:
if image: