mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
fix: resolve mypy type errors in test_llm_client.py
This commit is contained in:
parent
20b0b01994
commit
35519b6e84
1 changed files with 4 additions and 4 deletions
|
|
@ -35,7 +35,7 @@ class TestLLMClientEventLoopHandling:
|
|||
):
|
||||
# Create mock instances with close methods
|
||||
# Need to create new instances on each call to simulate proper client creation
|
||||
def create_openai_mock(*args, **kwargs):
|
||||
def create_openai_mock(*args: object, **kwargs: object) -> MagicMock:
|
||||
mock = MagicMock()
|
||||
mock.close = AsyncMock()
|
||||
mock.chat = MagicMock()
|
||||
|
|
@ -48,7 +48,7 @@ class TestLLMClientEventLoopHandling:
|
|||
)
|
||||
return mock
|
||||
|
||||
def create_anthropic_mock(*args, **kwargs):
|
||||
def create_anthropic_mock(*args: object, **kwargs: object) -> MagicMock:
|
||||
mock = MagicMock()
|
||||
mock.close = AsyncMock()
|
||||
return mock
|
||||
|
|
@ -74,8 +74,8 @@ class TestLLMClientEventLoopHandling:
|
|||
|
||||
# Simulate event loop change by creating a new loop and running in it
|
||||
# In Django/ASGI, this happens when requests are handled by different workers
|
||||
def make_call_in_new_loop():
|
||||
async def inner():
|
||||
def make_call_in_new_loop() -> None:
|
||||
async def inner() -> None:
|
||||
# Create a fresh LLM object in the new loop
|
||||
new_llm = LLM(
|
||||
name="gpt-4.1", model_type="openai", input_cost=2.0, output_cost=8.0, cached_input_cost=None
|
||||
|
|
|
|||
Loading…
Reference in a new issue