refactor(gui): 删除已不用的 logging/re/_LOGGER + RIGHT/Y 常量 (183 → 178)

This commit is contained in:
Your Name committed 2026-05-30 20:01:36 +08:00
1 parent 8c2d93a79f
commit 1cd94e9705
1 file changed
+2 -7
+2 -7
View File
@@ -1,6 +1,4 @@
import logging
import os
import re
import sys
import warnings
@@ -47,9 +45,6 @@ from gui.components.periodic_refreshers import (
warnings.filterwarnings("ignore", message=".*pin_memory.*", category=UserWarning)
warnings.filterwarnings("ignore", message=".*accelerator.*", category=UserWarning)
# 模块级 logger:内部"日志写入失败 / pump_logs 异常"等错误统一走 logging
_LOGGER = logging.getLogger("gui.gui_app")
def format_gui_log_line(line: str) -> str:
"""将完整日志行转换为 GUI 显示用的精简版本。
@@ -73,9 +68,9 @@ def main():
import tkinter as tk
from tkinter import ttk
try:
from ttkbootstrap.constants import LEFT, RIGHT, BOTH, X, Y
from ttkbootstrap.constants import LEFT, BOTH, X
except ImportError:
from tkinter.constants import LEFT, RIGHT, BOTH, X, Y # type: ignore[assignment]
from tkinter.constants import LEFT, BOTH, X # type: ignore[assignment]
q, _log_writer, on_line, runner = setup_log_pipeline(
format_gui_log_line=format_gui_log_line