chore: 统一代码风格并进行现代化改造

本次提交主要包含以下内容:
- **代码风格统一**:对多个文件进行了格式化,包括移除多余的空行、调整导入顺序、统一字符串引号等,以提高代码一致性和可读性。
- **类型提示现代化**:在多个文件中将旧的 `typing` 模块类型提示(如 `Optional[T]`、`List[T]`、`Union[T, U]`)更新为现代 Python 语法(`T | None`、`list[T]`、`T | U`)。
- **f-string 格式化**:在 `scripts/convert_manifest.py` 中,将 `.format()` 调用更新为更现代和易读的 f-string `!r` 表示法。
- **文件末尾换行符**:为多个文件添加或修正了文件末尾的换行符,遵循 POSIX 标准。
This commit is contained in:
minecraft1024a
2025-10-25 13:31:22 +08:00
parent 5fc9d1b9da
commit 3c4a3b0428
30 changed files with 126 additions and 124 deletions

View File

@@ -3,9 +3,9 @@ import datetime
import os
import shutil
import sys
from concurrent.futures import ThreadPoolExecutor, as_completed
from pathlib import Path
from threading import Lock
from concurrent.futures import ThreadPoolExecutor, as_completed
import orjson
from json_repair import repair_json