@@ -704,7 +704,10 @@ async def test_gpt5_with_openai_prefix_triggers_reasoning_effort(self, monkeypat
704704 ]
705705
706706 for model in prefixed_models :
707- with patch ('pr_agent.algo.ai_handlers.litellm_ai_handler.acompletion' , new_callable = AsyncMock ) as mock_completion :
707+ with patch (
708+ 'pr_agent.algo.ai_handlers.litellm_ai_handler.acompletion' ,
709+ new_callable = AsyncMock ,
710+ ) as mock_completion :
708711 mock_completion .return_value = create_mock_acompletion_response ()
709712
710713 handler = LiteLLMAIHandler ()
@@ -728,7 +731,10 @@ async def test_gpt5_with_openai_prefix_strips_thinking_suffix(self, monkeypatch,
728731 fake_settings = create_mock_settings ("low" )
729732 monkeypatch .setattr (litellm_handler , "get_settings" , lambda : fake_settings )
730733
731- with patch ('pr_agent.algo.ai_handlers.litellm_ai_handler.acompletion' , new_callable = AsyncMock ) as mock_completion :
734+ with patch (
735+ 'pr_agent.algo.ai_handlers.litellm_ai_handler.acompletion' ,
736+ new_callable = AsyncMock ,
737+ ) as mock_completion :
732738 mock_completion .return_value = create_mock_acompletion_response ()
733739
734740 handler = LiteLLMAIHandler ()
@@ -748,7 +754,10 @@ async def test_gpt5_with_explicit_azure_prefix_preserves_routing(self, monkeypat
748754 fake_settings = create_mock_settings ("medium" )
749755 monkeypatch .setattr (litellm_handler , "get_settings" , lambda : fake_settings )
750756
751- with patch ('pr_agent.algo.ai_handlers.litellm_ai_handler.acompletion' , new_callable = AsyncMock ) as mock_completion :
757+ with patch (
758+ 'pr_agent.algo.ai_handlers.litellm_ai_handler.acompletion' ,
759+ new_callable = AsyncMock ,
760+ ) as mock_completion :
752761 mock_completion .return_value = create_mock_acompletion_response ()
753762
754763 handler = LiteLLMAIHandler ()
@@ -779,7 +788,10 @@ async def test_gpt5_in_azure_mode_does_not_stack_prefixes(self, monkeypatch, moc
779788 ]
780789
781790 for input_model , expected in cases :
782- with patch ('pr_agent.algo.ai_handlers.litellm_ai_handler.acompletion' , new_callable = AsyncMock ) as mock_completion :
791+ with patch (
792+ 'pr_agent.algo.ai_handlers.litellm_ai_handler.acompletion' ,
793+ new_callable = AsyncMock ,
794+ ) as mock_completion :
783795 mock_completion .return_value = create_mock_acompletion_response ()
784796
785797 handler = LiteLLMAIHandler ()
0 commit comments