
CodexandClaude Opus 4.7
c442335b34
拆分 douyin_stage_handler (1009 → 5 个子模块 + 26 行 shim)
把 douyin/stage/douyin_stage_handler.py 的 StageHandler 类(4 个
@staticmethod)拆成 douyin/stage/douyin_stage_handler_pkg/ 子包:
- diagnose (37) diagnose_stage_from_current_screen 阶段诊断分发
- check_live (774) check_in_live_room_by_icon 直播间图标检测(最大头)
- handle_detail (20) handle_in_fudai_detail 福袋详情页处理
- handle_room (195) handle_live_room_has_or_not_fudai 直播间福袋检测分发
- handler (32) StageHandler 类(薄壳,每个方法 1 行 forwarding)
策略:4 个方法都是 @staticmethod 第一参数 analyser,搬到 module-level 后
类方法变成 1 行 forwarding。类内部 0 互调,外部 3 处 StageHandler.method
(douyin_fudai.py / fudai_stage_detection.py)保持不变。
外部 import 路径不变:
``from douyin.stage.douyin_stage_handler import StageHandler`` 仍可用。
回归:
- 6 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- StageHandler.diagnose / module-level diagnose 都正确指向 wrapper / 实现
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 18:36:41 +08:00
..
2026-05-21 18:36:41 +08:00
2026-01-02 23:57:03 +08:00
2026-05-21 18:36:41 +08:00
2026-05-21 12:01:16 +08:00