@@ -115,7 +115,9 @@ def test_nonstreaming_create_message(
115115 assert span ["data" ][SPANDATA .AI_MODEL_ID ] == "model"
116116
117117 if send_default_pii and include_prompts :
118- assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (messages )
118+ assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (
119+ messages
120+ )
119121 assert span ["data" ][SPANDATA .AI_RESPONSES ] == _serialize_span_attribute (
120122 [{"type" : "text" , "text" : "Hi, I'm Claude." }]
121123 )
@@ -183,7 +185,9 @@ async def test_nonstreaming_create_message_async(
183185 assert span ["data" ][SPANDATA .AI_MODEL_ID ] == "model"
184186
185187 if send_default_pii and include_prompts :
186- assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (messages )
188+ assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (
189+ messages
190+ )
187191 assert span ["data" ][SPANDATA .AI_RESPONSES ] == _serialize_span_attribute (
188192 [{"type" : "text" , "text" : "Hi, I'm Claude." }]
189193 )
@@ -282,7 +286,9 @@ def test_streaming_create_message(
282286 assert span ["data" ][SPANDATA .AI_MODEL_ID ] == "model"
283287
284288 if send_default_pii and include_prompts :
285- assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (messages )
289+ assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (
290+ messages
291+ )
286292 assert span ["data" ][SPANDATA .AI_RESPONSES ] == _serialize_span_attribute (
287293 [{"type" : "text" , "text" : "Hi! I'm Claude!" }]
288294 )
@@ -385,7 +391,9 @@ async def test_streaming_create_message_async(
385391 assert span ["data" ][SPANDATA .AI_MODEL_ID ] == "model"
386392
387393 if send_default_pii and include_prompts :
388- assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (messages )
394+ assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (
395+ messages
396+ )
389397 assert span ["data" ][SPANDATA .AI_RESPONSES ] == _serialize_span_attribute (
390398 [{"type" : "text" , "text" : "Hi! I'm Claude!" }]
391399 )
@@ -515,7 +523,9 @@ def test_streaming_create_message_with_input_json_delta(
515523 assert span ["data" ][SPANDATA .AI_MODEL_ID ] == "model"
516524
517525 if send_default_pii and include_prompts :
518- assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (messages )
526+ assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (
527+ messages
528+ )
519529 assert span ["data" ][SPANDATA .AI_RESPONSES ] == _serialize_span_attribute (
520530 [{"type" : "text" , "text" : "" }]
521531 ) # we do not record InputJSONDelta because it could contain PII
@@ -652,7 +662,9 @@ async def test_streaming_create_message_with_input_json_delta_async(
652662 assert span ["data" ][SPANDATA .AI_MODEL_ID ] == "model"
653663
654664 if send_default_pii and include_prompts :
655- assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (messages )
665+ assert span ["data" ][SPANDATA .AI_INPUT_MESSAGES ] == _serialize_span_attribute (
666+ messages
667+ )
656668 assert span ["data" ][SPANDATA .AI_RESPONSES ] == _serialize_span_attribute (
657669 [{"type" : "text" , "text" : "" }]
658670 ) # we do not record InputJSONDelta because it could contain PII
0 commit comments