Refactor: reformat all code for lefthook using ruff and gofmt (#16585)

This commit is contained in:
Wang Qi
2026-07-03 12:53:39 +08:00
committed by GitHub
parent 19fcb4a981
commit 6a4b9be426
588 changed files with 11123 additions and 15412 deletions

View File

@@ -27,9 +27,9 @@ def get_json_result_from_llm_response(response_str: str) -> dict:
"""
try:
clean_str = response_str.strip()
if clean_str.startswith('```json'):
if clean_str.startswith("```json"):
clean_str = clean_str[7:] # Remove the starting ```json
if clean_str.endswith('```'):
if clean_str.endswith("```"):
clean_str = clean_str[:-3] # Remove the ending ```
return json.loads(clean_str.strip())