ruff fix但指定了--unsafe-fixes

This commit is contained in:
minecraft1024a
2025-10-05 21:48:32 +08:00
parent 0b4e1f5b7b
commit 9d705463ce
76 changed files with 300 additions and 315 deletions

View File

@@ -33,7 +33,7 @@ def _extract_json_from_text(text: str):
if isinstance(parsed_json, dict):
# 如果字典只有一个键,并且值是列表,返回那个列表
if len(parsed_json) == 1:
value = list(parsed_json.values())[0]
value = next(iter(parsed_json.values()))
if isinstance(value, list):
return value
return parsed_json