feat: 添加工具以查找重复的异常处理,增强代码质量检查;新增验证 GUI 回退方式的自检脚本
This commit is contained in:
1 parent
982357927e
commit
43e39f4db6
16 files changed
+472
-180
No files matched your search
+6
-4
@@ -14,7 +14,7 @@ _project_root = os.path.dirname(_script_dir)
|
||||
if _project_root not in sys.path:
|
||||
sys.path.insert(0, _project_root)
|
||||
|
||||
from PIL import Image, ImageTk
|
||||
from PIL import Image, ImageTk # type: ignore[import]
|
||||
|
||||
# 抽离:ADB/配置/参数结构体到 gui_core.py(便于后续模块化)
|
||||
from gui.gui_core import (
|
||||
@@ -2810,7 +2810,9 @@ def main():
|
||||
(".png", ".jpg", ".jpeg", ".bmp", ".webp", ".gif")
|
||||
):
|
||||
# 获取相对路径
|
||||
rel_path = os.path.relpath(os.path.join(root, file), images_dir)
|
||||
rel_path = os.path.relpath(
|
||||
os.path.join(root, file), str(images_dir)
|
||||
)
|
||||
# 统一使用正斜杠(Windows和Unix都支持)
|
||||
rel_path = rel_path.replace("\\", "/")
|
||||
image_files.append(rel_path)
|
||||
@@ -3164,7 +3166,7 @@ def main():
|
||||
seconds = uptime_seconds % 60
|
||||
lines.append(f"运行时长: {hours:02d}:{minutes:02d}:{seconds:02d}")
|
||||
else:
|
||||
lines.append(f"运行时长: -")
|
||||
lines.append("运行时长: -")
|
||||
|
||||
last_log_ts = stats.get("last_log_ts")
|
||||
if last_log_ts:
|
||||
@@ -4099,7 +4101,7 @@ def main():
|
||||
lines.append(
|
||||
f"│ 🏠 直播间名称(原始):{room_title_raw or '未知'}"
|
||||
)
|
||||
lines.append(f"│")
|
||||
lines.append("│")
|
||||
lines.append(f"│ 📝 记录时间:{created_str_full}")
|
||||
lines.append(f"└{'─' * 58}")
|
||||
lines.append("")
|
||||
|
||||
Reference in new issue
Block a user