2424from google .adk .events .event import Event
2525from google .adk .flows .llm_flows .base_llm_flow import _handle_after_model_callback
2626from google .adk .flows .llm_flows .base_llm_flow import BaseLlmFlow
27- from google .adk .models .google_llm import Gemini , GoogleLLMVariant
27+ from google .adk .models .google_llm import Gemini
28+ from google .adk .models .google_llm import GoogleLLMVariant
2829from google .adk .models .llm_request import LlmRequest
2930from google .adk .models .llm_response import LlmResponse
3031from google .adk .plugins .base_plugin import BasePlugin
@@ -1390,7 +1391,7 @@ async def mock_receive_2():
13901391
13911392@pytest .mark .asyncio
13921393@pytest .mark .parametrize (
1393- " api_backend" ,
1394+ ' api_backend' ,
13941395 [
13951396 GoogleLLMVariant .GEMINI_API ,
13961397 GoogleLLMVariant .VERTEX_AI ,
@@ -1422,8 +1423,11 @@ async def mock_receive():
14221423 flow = BaseLlmFlowForTesting ()
14231424
14241425 with mock .patch .object (flow , '_send_to_model' , new_callable = AsyncMock ):
1426+
14251427 async def mock_preprocess (ctx , req ):
1426- req .contents = [types .Content (parts = [types .Part .from_text (text = 'history' )])]
1428+ req .contents = [
1429+ types .Content (parts = [types .Part .from_text (text = 'history' )])
1430+ ]
14271431 yield Event (id = Event .new_id (), author = 'test' )
14281432
14291433 with mock .patch .object (
@@ -1467,7 +1471,9 @@ async def test_run_live_respects_explicit_initial_history_in_client_content_fals
14671471 )
14681472 invocation_context .live_request_queue = LiveRequestQueue ()
14691473 run_config = RunConfig (
1470- history_config = types .HistoryConfig (initial_history_in_client_content = False )
1474+ history_config = types .HistoryConfig (
1475+ initial_history_in_client_content = False
1476+ )
14711477 )
14721478 invocation_context .run_config = run_config
14731479
@@ -1476,6 +1482,7 @@ async def test_run_live_respects_explicit_initial_history_in_client_content_fals
14761482 async def mock_preprocess (ctx , req ):
14771483 req .contents = [types .Content (parts = [types .Part .from_text (text = 'history' )])]
14781484 from google .adk .flows .llm_flows .basic import _build_basic_request
1485+
14791486 _build_basic_request (ctx , req )
14801487 yield Event (id = Event .new_id (), author = 'test' )
14811488
@@ -1509,5 +1516,7 @@ async def mock_receive():
15091516 assert mock_connect .call_count == 1
15101517 call_req = mock_connect .call_args [0 ][0 ]
15111518 assert call_req .live_connect_config .history_config is not None
1512- assert call_req .live_connect_config .history_config .initial_history_in_client_content is False
1513-
1519+ assert (
1520+ call_req .live_connect_config .history_config .initial_history_in_client_content
1521+ is False
1522+ )
0 commit comments