From 5c222f588091cfc4d4f57f2855bfd20a76df3be2 Mon Sep 17 00:00:00 2001 From: maxmet91 Date: Sun, 24 Nov 2024 10:30:00 +0000 Subject: [PATCH] Fix linter error --- libs/genai/langchain_google_genai/_image_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/genai/langchain_google_genai/_image_utils.py b/libs/genai/langchain_google_genai/_image_utils.py index 4fabcd84..35835778 100644 --- a/libs/genai/langchain_google_genai/_image_utils.py +++ b/libs/genai/langchain_google_genai/_image_utils.py @@ -8,8 +8,8 @@ from typing import Any, Dict from urllib.parse import urlparse +import filetype # type: ignore[import] import requests -import filetype from google.ai.generativelanguage_v1beta.types import Part @@ -88,7 +88,7 @@ def load_part(self, image_string: str) -> Part: raise ValueError(msg) inline_data: Dict[str, Any] = {"data": bytes_} - + mime_type, _ = mimetypes.guess_type(image_string) if not mime_type: kind = filetype.guess(bytes_)