@@ -472,13 +472,12 @@ def mock_hf_chat_completion_api_streaming_tools(httpx_mock):
472472@pytest .mark .parametrize ("send_default_pii" , [True , False ])
473473@pytest .mark .parametrize ("include_prompts" , [True , False ])
474474def test_text_generation (
475- sentry_init ,
476- capture_events ,
477- send_default_pii ,
478- include_prompts ,
479- mock_hf_text_generation_api ,
480- ):
481- # type: (Any, Any, Any, Any, Any) -> None
475+ sentry_init : "Any" ,
476+ capture_events : "Any" ,
477+ send_default_pii : "Any" ,
478+ include_prompts : "Any" ,
479+ mock_hf_text_generation_api : "Any" ,
480+ ) -> None :
482481 sentry_init (
483482 traces_sample_rate = 1.0 ,
484483 send_default_pii = send_default_pii ,
@@ -541,13 +540,12 @@ def test_text_generation(
541540@pytest .mark .parametrize ("send_default_pii" , [True , False ])
542541@pytest .mark .parametrize ("include_prompts" , [True , False ])
543542def test_text_generation_streaming (
544- sentry_init ,
545- capture_events ,
546- send_default_pii ,
547- include_prompts ,
548- mock_hf_text_generation_api_streaming ,
549- ):
550- # type: (Any, Any, Any, Any, Any) -> None
543+ sentry_init : "Any" ,
544+ capture_events : "Any" ,
545+ send_default_pii : "Any" ,
546+ include_prompts : "Any" ,
547+ mock_hf_text_generation_api_streaming : "Any" ,
548+ ) -> None :
551549 sentry_init (
552550 traces_sample_rate = 1.0 ,
553551 send_default_pii = send_default_pii ,
@@ -611,13 +609,12 @@ def test_text_generation_streaming(
611609@pytest .mark .parametrize ("send_default_pii" , [True , False ])
612610@pytest .mark .parametrize ("include_prompts" , [True , False ])
613611def test_chat_completion (
614- sentry_init ,
615- capture_events ,
616- send_default_pii ,
617- include_prompts ,
618- mock_hf_chat_completion_api ,
619- ):
620- # type: (Any, Any, Any, Any, Any) -> None
612+ sentry_init : "Any" ,
613+ capture_events : "Any" ,
614+ send_default_pii : "Any" ,
615+ include_prompts : "Any" ,
616+ mock_hf_chat_completion_api : "Any" ,
617+ ) -> None :
621618 sentry_init (
622619 traces_sample_rate = 1.0 ,
623620 send_default_pii = send_default_pii ,
@@ -683,13 +680,12 @@ def test_chat_completion(
683680@pytest .mark .parametrize ("send_default_pii" , [True , False ])
684681@pytest .mark .parametrize ("include_prompts" , [True , False ])
685682def test_chat_completion_streaming (
686- sentry_init ,
687- capture_events ,
688- send_default_pii ,
689- include_prompts ,
690- mock_hf_chat_completion_api_streaming ,
691- ):
692- # type: (Any, Any, Any, Any, Any) -> None
683+ sentry_init : "Any" ,
684+ capture_events : "Any" ,
685+ send_default_pii : "Any" ,
686+ include_prompts : "Any" ,
687+ mock_hf_chat_completion_api_streaming : "Any" ,
688+ ) -> None :
693689 sentry_init (
694690 traces_sample_rate = 1.0 ,
695691 send_default_pii = send_default_pii ,
@@ -755,9 +751,8 @@ def test_chat_completion_streaming(
755751
756752@pytest .mark .httpx_mock (assert_all_requests_were_expected = False )
757753def test_chat_completion_api_error (
758- sentry_init , capture_events , mock_hf_api_with_errors
759- ):
760- # type: (Any, Any, Any) -> None
754+ sentry_init : "Any" , capture_events : "Any" , mock_hf_api_with_errors : "Any"
755+ ) -> None :
761756 sentry_init (traces_sample_rate = 1.0 )
762757 events = capture_events ()
763758
@@ -809,8 +804,9 @@ def test_chat_completion_api_error(
809804
810805
811806@pytest .mark .httpx_mock (assert_all_requests_were_expected = False )
812- def test_span_status_error (sentry_init , capture_events , mock_hf_api_with_errors ):
813- # type: (Any, Any, Any) -> None
807+ def test_span_status_error (
808+ sentry_init : "Any" , capture_events : "Any" , mock_hf_api_with_errors : "Any"
809+ ) -> None :
814810 sentry_init (traces_sample_rate = 1.0 )
815811 events = capture_events ()
816812
@@ -846,13 +842,12 @@ def test_span_status_error(sentry_init, capture_events, mock_hf_api_with_errors)
846842@pytest .mark .parametrize ("send_default_pii" , [True , False ])
847843@pytest .mark .parametrize ("include_prompts" , [True , False ])
848844def test_chat_completion_with_tools (
849- sentry_init ,
850- capture_events ,
851- send_default_pii ,
852- include_prompts ,
853- mock_hf_chat_completion_api_tools ,
854- ):
855- # type: (Any, Any, Any, Any, Any) -> None
845+ sentry_init : "Any" ,
846+ capture_events : "Any" ,
847+ send_default_pii : "Any" ,
848+ include_prompts : "Any" ,
849+ mock_hf_chat_completion_api_tools : "Any" ,
850+ ) -> None :
856851 sentry_init (
857852 traces_sample_rate = 1.0 ,
858853 send_default_pii = send_default_pii ,
@@ -935,13 +930,12 @@ def test_chat_completion_with_tools(
935930@pytest .mark .parametrize ("send_default_pii" , [True , False ])
936931@pytest .mark .parametrize ("include_prompts" , [True , False ])
937932def test_chat_completion_streaming_with_tools (
938- sentry_init ,
939- capture_events ,
940- send_default_pii ,
941- include_prompts ,
942- mock_hf_chat_completion_api_streaming_tools ,
943- ):
944- # type: (Any, Any, Any, Any, Any) -> None
933+ sentry_init : "Any" ,
934+ capture_events : "Any" ,
935+ send_default_pii : "Any" ,
936+ include_prompts : "Any" ,
937+ mock_hf_chat_completion_api_streaming_tools : "Any" ,
938+ ) -> None :
945939 sentry_init (
946940 traces_sample_rate = 1.0 ,
947941 send_default_pii = send_default_pii ,
0 commit comments