Skip to content

Commit a9de79d

Browse files
committed
code format checker changes
1 parent d453ba1 commit a9de79d

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

sdk/ai/azure-ai-projects/azure/ai/projects/telemetry/_responses_instrumentor.py

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,13 +2334,13 @@ def _add_conversation_item_event( # pylint: disable=too-many-branches
23342334

23352335
# Add file search details
23362336
file_search_details: Dict[str, Any] = {}
2337-
2337+
23382338
if hasattr(item, "queries") and item.queries:
23392339
file_search_details["queries"] = item.queries
2340-
2340+
23412341
if hasattr(item, "status"):
23422342
file_search_details["status"] = item.status
2343-
2343+
23442344
if hasattr(item, "results") and item.results:
23452345
file_search_details["results"] = [
23462346
{
@@ -2374,29 +2374,26 @@ def _add_conversation_item_event( # pylint: disable=too-many-branches
23742374

23752375
# Add code interpreter details
23762376
code_interpreter_details: Dict[str, Any] = {}
2377-
2377+
23782378
if hasattr(item, "code") and item.code:
23792379
code_interpreter_details["code"] = item.code
2380-
2380+
23812381
if hasattr(item, "status"):
23822382
code_interpreter_details["status"] = item.status
2383-
2383+
23842384
if hasattr(item, "outputs") and item.outputs:
23852385
outputs_list = []
23862386
for output in item.outputs:
23872387
output_type = getattr(output, "type", None)
23882388
if output_type == "logs":
2389-
outputs_list.append({
2390-
"type": "logs",
2391-
"logs": getattr(output, "logs", None)
2392-
})
2389+
outputs_list.append({"type": "logs", "logs": getattr(output, "logs", None)})
23932390
elif output_type == "image":
2394-
outputs_list.append({
2395-
"type": "image",
2396-
"image": {
2397-
"file_id": getattr(getattr(output, "image", None), "file_id", None)
2391+
outputs_list.append(
2392+
{
2393+
"type": "image",
2394+
"image": {"file_id": getattr(getattr(output, "image", None), "file_id", None)},
23982395
}
2399-
})
2396+
)
24002397
if outputs_list:
24012398
code_interpreter_details["outputs"] = outputs_list
24022399

@@ -2423,14 +2420,14 @@ def _add_conversation_item_event( # pylint: disable=too-many-branches
24232420

24242421
# Add web search details
24252422
web_search_details: Dict[str, Any] = {}
2426-
2423+
24272424
if hasattr(item, "status"):
24282425
web_search_details["status"] = item.status
2429-
2426+
24302427
if hasattr(item, "action") and item.action:
24312428
action_type = getattr(item.action, "type", None)
24322429
web_search_details["action_type"] = action_type
2433-
2430+
24342431
if action_type == "search" and hasattr(item.action, "query"):
24352432
web_search_details["query"] = item.action.query
24362433
elif action_type == "open_page" and hasattr(item.action, "url"):

0 commit comments

Comments
 (0)