Skip to content

Commit 91a7032

Browse files
authored
regex adjusted
1 parent b08a1da commit 91a7032

File tree

1 file changed

+0
-4
lines changed
  • samples/agent/adk/restaurant_finder

1 file changed

+0
-4
lines changed

samples/agent/adk/restaurant_finder/agent.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import logging
1717
import os
1818
import re
19-
import re
2019
from collections.abc import AsyncIterable
2120
from typing import Any
2221

@@ -228,9 +227,6 @@ async def stream(self, query, session_id) -> AsyncIterable[dict[str, Any]]:
228227
if not json_string_cleaned:
229228
raise ValueError("Cleaned JSON string is empty.")
230229

231-
# Autofix: Remove trailing commas from arrays and objects
232-
json_string_cleaned = re.sub(r",\s*([\]}])", r"\1", json_string_cleaned)
233-
234230
# Autofix: Remove trailing commas from arrays and objects
235231
json_string_cleaned = re.sub(r",(?=\s*[\]}])", "", json_string_cleaned)
236232

0 commit comments

Comments
 (0)