Skip to content

Commit

Permalink
genai: chore type: ignore remaining mypy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu007 committed Sep 1, 2024
1 parent 3cb738d commit 9bf4893
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/genai/langchain_google_genai/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,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__)

Expand Down Expand Up @@ -254,7 +254,7 @@ def _is_b64(s: str) -> bool:

def _load_image_from_gcs(path: str, project: Optional[str] = None) -> Image:
try:
from google.cloud import storage # type: ignore[attr-defined]
from google.cloud import storage
except ImportError:
raise ImportError(
"google-cloud-storage is required to load images from GCS."
Expand Down

0 comments on commit 9bf4893

Please sign in to comment.