Skip to content

Commit 2be0419

Browse files
committed
fix(integrations): add type ignore for missing PIL.Image import
1 parent f72aa45 commit 2be0419

File tree

1 file changed

+2
-2
lines changed
  • sentry_sdk/integrations/google_genai

1 file changed

+2
-2
lines changed

sentry_sdk/integrations/google_genai/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def extract_contents_messages(contents: "ContentListUnion") -> "List[Dict[str, A
244244

245245
# Handle PIL.Image.Image
246246
try:
247-
from PIL import Image as PILImage
247+
from PIL import Image as PILImage # type: ignore[import-not-found]
248248

249249
if isinstance(contents, PILImage.Image):
250250
blob_part = _extract_pil_image(contents)
@@ -417,7 +417,7 @@ def _extract_tool_message_from_part(part: "Any") -> "Optional[dict[str, Any]]":
417417
def _extract_pil_image(image: "Any") -> "Optional[dict[str, Any]]":
418418
"""Extract blob part from PIL.Image.Image."""
419419
try:
420-
from PIL import Image as PILImage
420+
from PIL import Image as PILImage # type: ignore[import-not-found]
421421
import io
422422

423423
if not isinstance(image, PILImage.Image):

0 commit comments

Comments
 (0)