🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-05-21 01:20:30 +00:00
parent e82a5f7d47
commit 6730b60e0a

View File

@@ -1,6 +1,7 @@
import json
from json_repair import repair_json
def _find_unclosed(json_str):
"""
Identifies the unclosed braces and brackets in the JSON string.
@@ -94,4 +95,4 @@ def new_fix_broken_generated_json(json_str: str) -> str:
return json_str # 如果有效则按原样返回
except json.JSONDecodeError:
# 如果无效,则尝试修复它
return repair_json(json_str)
return repair_json(json_str)