fix: python formatting

This commit is contained in:
Constrat
2025-10-11 12:52:05 +02:00
parent b562b6b231
commit fad643985e

View File

@@ -76,7 +76,9 @@ def main(cn_base_path, global_resources):
if not file.endswith(".json"): # 判断是否为 JSON 文件
continue
file_path = Path(root) / file
with open(file_path, "r", encoding="utf-8-sig") as f: # Changed to utf-8-sig
with open(
file_path, "r", encoding="utf-8-sig"
) as f: # Changed to utf-8-sig
cn_tasks[file_path.relative_to(cn_base_path)] = json.load(
f, object_pairs_hook=raise_on_duplicate_keys
)
@@ -117,7 +119,9 @@ def main(cn_base_path, global_resources):
continue
file_path = Path(root) / file
relative_path = file_path.relative_to(overseas_path)
with open(file_path, "r", encoding="utf-8-sig") as f: # Changed to utf-8-sig
with open(
file_path, "r", encoding="utf-8-sig"
) as f: # Changed to utf-8-sig
tasks = json.load(f, object_pairs_hook=raise_on_duplicate_keys)
base_order = cn_order.get(relative_path, [])