Skip to content

Commit 0031f96

Browse files
committed
Fix 3.9
Change-Id: Iee02352ca21fa66da9b097d4dfa9454b67609e79
1 parent 4c88b94 commit 0031f96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google/generativeai/types/image_types/_image_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
def _pil_to_blob(image: PIL.Image.Image) -> protos.Blob:
4545
# If the image is a local file, return a file-based blob without any modification.
4646
# Otherwise, return a lossless WebP blob (same quality with optimized size).
47-
def file_blob(image: PIL.Image.Image) -> protos.Blob | None:
47+
def file_blob(image: PIL.Image.Image) -> Union[protos.Blob, None]:
4848
if not isinstance(image, PIL.ImageFile.ImageFile) or image.filename is None:
4949
return None
5050
filename = str(image.filename)

0 commit comments

Comments
 (0)