chore: Clean up and refactor codebase for improved maintainability
- Removed obsolete command-line test parameters from `run_cli.py` to streamline functionality. - Introduced a new `ocr_preprocess.py` module for unified OCR image preprocessing, enhancing recognition stability. - Updated various components to utilize the new preprocessing function, improving code organization and readability. - Adjusted configuration values in `config.json` for better performance and consistency. - Added comprehensive technical documentation for the Douyin project, detailing code modification standards and operational guidelines. - Cleaned up excessive blank lines across multiple files to enhance overall readability.
This commit is contained in:
1 parent
efe6e2252f
commit
223c127e11
70 files changed
+17121
-1752
No files matched your search
@@ -6,7 +6,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Callable, Optional, List, Dict
|
||||
from typing import Any, Callable, Optional, List, Dict, Tuple
|
||||
import queue
|
||||
import re
|
||||
import threading
|
||||
@@ -44,7 +44,7 @@ except ImportError:
|
||||
class EnhancedLogViewer(ttk.Frame):
|
||||
"""增强的日志查看器组件"""
|
||||
|
||||
def __init__(self, parent: Any, log_queue: "queue.Queue[str]" = None):
|
||||
def __init__(self, parent: Any, log_queue: Optional[queue.Queue] = None):
|
||||
super().__init__(parent)
|
||||
|
||||
# 初始化数据
|
||||
@@ -372,9 +372,9 @@ def format_gui_log_line(line: str) -> str:
|
||||
|
||||
def create_log_viewer(
|
||||
parent: Any,
|
||||
log_queue: "queue.Queue[str]",
|
||||
log_queue: Optional[queue.Queue],
|
||||
on_line: Callable[[str], None]
|
||||
) -> tuple[ScrolledText, Callable[[], None]]:
|
||||
) -> Any:
|
||||
"""创建日志查看器组件(兼容旧接口)。
|
||||
|
||||
参数:
|
||||
|
||||
Reference in new issue
Block a user