feat: mypy for all type check (#10921)

This commit is contained in:
yihong authored and GitHub committed 2024-12-24 18:38:51 +08:00
1 parent c91e8b1737
commit 56e15d09a9
584 files changed
+3975 -2826

No files matched your search

@@ -1,7 +1,7 @@
from collections.abc import Generator
from unittest.mock import MagicMock
import google.generativeai.types.generation_types as generation_config_types
import google.generativeai.types.generation_types as generation_config_types # type: ignore
import pytest
from _pytest.monkeypatch import MonkeyPatch
from google.ai import generativelanguage as glm
@@ -45,7 +45,7 @@ class MockGoogleClass:
return GenerateContentResponse(done=True, iterator=None, result=glm.GenerateContentResponse({}), chunks=[])
@staticmethod
def generate_content_stream() -> Generator[GenerateContentResponse, None, None]:
def generate_content_stream() -> MockGoogleResponseClass:
return MockGoogleResponseClass()
def generate_content(