@@ -3623,14 +3623,14 @@ def _llm_type(self) -> str:
36233623 if span_streaming or stream_gen_ai_spans :
36243624 items = capture_items ("event" )
36253625
3626- with start_transaction (), pytest .raises (ValueError ):
3626+ with start_transaction (), pytest .raises (ValueError ): # noqa: PT011
36273627 list (agent_executor .stream ({"input" : "How many letters in the word eudca" }))
36283628
36293629 (error ,) = (item .payload for item in items )
36303630 else :
36313631 events = capture_events ()
36323632
3633- with start_transaction (), pytest .raises (ValueError ):
3633+ with start_transaction (), pytest .raises (ValueError ): # noqa: PT011
36343634 list (agent_executor .stream ({"input" : "How many letters in the word eudca" }))
36353635
36363636 error = events [0 ]
@@ -3698,7 +3698,7 @@ def _llm_type(self) -> str:
36983698 agent = agent , tools = [get_word_length ], verbose = True
36993699 )
37003700
3701- with pytest .raises (ValueError ):
3701+ with pytest .raises (ValueError ): # noqa: PT011
37023702 list (
37033703 agent_executor .stream (
37043704 {"input" : "How many letters in the word eudca" }
@@ -3737,7 +3737,7 @@ def _llm_type(self) -> str:
37373737 agent = agent , tools = [get_word_length ], verbose = True
37383738 )
37393739
3740- with pytest .raises (ValueError ):
3740+ with pytest .raises (ValueError ): # noqa: PT011
37413741 list (
37423742 agent_executor .stream (
37433743 {"input" : "How many letters in the word eudca" }
@@ -3777,7 +3777,7 @@ def _llm_type(self) -> str:
37773777 agent = agent , tools = [get_word_length ], verbose = True
37783778 )
37793779
3780- with pytest .raises (ValueError ):
3780+ with pytest .raises (ValueError ): # noqa: PT011
37813781 list (
37823782 agent_executor .stream (
37833783 {"input" : "How many letters in the word eudca" }
@@ -3857,7 +3857,7 @@ def test_langchain_tool_error(
38573857
38583858 with patch .object (
38593859 llm .client ._client ._client , "send" , side_effect = [tool_response ]
3860- ), start_transaction (name = "tx" ), pytest .raises (ValueError ):
3860+ ), start_transaction (name = "tx" ), pytest .raises (ValueError ): # noqa: PT011
38613861 agent .invoke ({"messages" : [HumanMessage (content = "hi" )]})
38623862
38633863 error_events = [event for event in events if event .get ("level" ) == "error" ]
0 commit comments