refactor(gui): 删除已不再被 main 使用的 log_color_config fallback 段 (201 → 183)
This commit is contained in:
1 parent
92d60f9931
commit
8c2d93a79f
1 file changed
-18
@@ -42,24 +42,6 @@ from gui.components.periodic_refreshers import (
|
||||
setup_close_handler,
|
||||
)
|
||||
|
||||
# 导入日志颜色配置模块
|
||||
try:
|
||||
from gui.components.log_color_config import (
|
||||
get_color_config,
|
||||
apply_operation_color,
|
||||
get_operation_type,
|
||||
)
|
||||
except ImportError:
|
||||
# 如果模块不存在,使用空函数作为回退
|
||||
def get_color_config(theme: str = "litera"):
|
||||
return {}
|
||||
|
||||
def apply_operation_color(*args, **kwargs):
|
||||
pass
|
||||
|
||||
def get_operation_type(line: str) -> str | None:
|
||||
return None
|
||||
|
||||
|
||||
# 抑制 PyTorch DataLoader 的 pin_memory 警告(当没有 GPU 时,EasyOCR 会触发此警告)
|
||||
warnings.filterwarnings("ignore", message=".*pin_memory.*", category=UserWarning)
|
||||
|
||||
Reference in new issue
Block a user