refactor(cleanup): 移除死代码和冗余导入
- douyin_fudai_core.py: 移除未使用的 ThreadPoolExecutor/check_contain 导入 和被覆盖的 fudai_result_checker 导入 - ocr_executor.py: 移除重复的 _fudai_ocr_executor_state 初始化 - flow_control_pkg: 移除 stage_handler/no_fudai/find_open 中未使用的导入 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ca00258bf3
commit
4908df19d4
5 files changed
+4
-32
No files matched your search
@@ -8,11 +8,10 @@ from __future__ import annotations
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
from typing import Any, Callable, List, Optional, Tuple
|
||||
from typing import Any, Callable, Optional
|
||||
|
||||
from douyin.core import path_config
|
||||
from douyin.detection.douyin_detection import check_have_fudai_with_ready_screenshot
|
||||
from douyin.fudai.douyin_fudai_core import should_skip_fudai_by_config
|
||||
|
||||
|
||||
def find_and_open_fudai_detail(
|
||||
|
||||
@@ -5,13 +5,8 @@ handle_no_fudai_situation:在直播间未识别到福袋时做简单的等待
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
from typing import Any, Callable, List, Optional, Tuple
|
||||
|
||||
from douyin.core import path_config
|
||||
from douyin.detection.douyin_detection import check_have_fudai_with_ready_screenshot
|
||||
from douyin.fudai.douyin_fudai_core import should_skip_fudai_by_config
|
||||
from typing import Any, Callable, List, Optional
|
||||
|
||||
|
||||
def handle_no_fudai_situation(
|
||||
|
||||
@@ -5,14 +5,8 @@ handle_stage_after_diagnosis:记录当前阶段信息(暂不做复杂跳转
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
from typing import Any, Callable, List, Optional, Tuple
|
||||
|
||||
from douyin.core import path_config
|
||||
from douyin.detection.douyin_detection import check_have_fudai_with_ready_screenshot
|
||||
from douyin.fudai.douyin_fudai_core import should_skip_fudai_by_config
|
||||
from typing import Any
|
||||
|
||||
|
||||
def handle_stage_after_diagnosis(
|
||||
|
||||
@@ -5,20 +5,12 @@ import re
|
||||
import time
|
||||
import threading
|
||||
from typing import Tuple, Any, Optional, Dict
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
from douyin.utils.douyin_utils import extract_prize_value_yuan
|
||||
from douyin.core import path_config
|
||||
from douyin.fudai.core.fudai_filter import (
|
||||
is_watch_task_fudai,
|
||||
_is_short_countdown_text,
|
||||
check_contain,
|
||||
)
|
||||
from douyin.fudai.core.fudai_result_checker import (
|
||||
check_lucky_draw_result,
|
||||
check_have_reward_notice_confirm,
|
||||
check_in_order_confirm_page,
|
||||
get_reward,
|
||||
)
|
||||
|
||||
# 从新模块导入调试工具函数
|
||||
@@ -27,11 +19,8 @@ from douyin.fudai.core.fudai_debug_utils import (
|
||||
)
|
||||
|
||||
|
||||
# 从子包 re-export(保持兼容):薄壳 forwarding + OCR 线程池
|
||||
# 从子包 re-export(保持兼容):薄壳 forwarding
|
||||
from douyin.fudai.douyin_fudai_core_pkg import (
|
||||
_FudaiOcrExecutorState,
|
||||
_fudai_ocr_executor_state,
|
||||
_get_fudai_ocr_executor,
|
||||
attend_choujiang,
|
||||
basic_join_decision,
|
||||
check_have_reward_notice_confirm,
|
||||
|
||||
@@ -20,11 +20,6 @@ class _FudaiOcrExecutorState:
|
||||
_fudai_ocr_executor_state = _FudaiOcrExecutorState()
|
||||
|
||||
|
||||
|
||||
|
||||
_fudai_ocr_executor_state = _FudaiOcrExecutorState()
|
||||
|
||||
|
||||
def _get_fudai_ocr_executor(optimal_workers: int) -> ThreadPoolExecutor:
|
||||
"""获取复用的 OCR 线程池;如线程数变化则重建。"""
|
||||
state = _fudai_ocr_executor_state
|
||||
|
||||
Reference in new issue
Block a user