diff --git a/libs/genai/langchain_google_genai/chat_models.py b/libs/genai/langchain_google_genai/chat_models.py index cbcf7c77..2efc0dcc 100644 --- a/libs/genai/langchain_google_genai/chat_models.py +++ b/libs/genai/langchain_google_genai/chat_models.py @@ -123,13 +123,13 @@ IMAGE_TYPES: Tuple = () try: - import PIL - from PIL.Image import Image + import PIL # type: ignore + from PIL.Image import Image # type: ignore IMAGE_TYPES = IMAGE_TYPES + (Image,) except ImportError: - PIL = None # type: ignore - Image = None # type: ignore + PIL = None + Image = None logger = logging.getLogger(__name__)