把 douyin/detection/douyin_detection.py 按职责拆成 douyin/detection/detection_pkg/ 子包: - _common (14) _ensure_detection_cache 共享缓存初始化 - detail (323) check_detail_height + check_in_fudai_detail(详情页相关) - finder (1438) check_have_fudai_with_ready_screenshot(找福袋图标主入口,最大头) 原文件改为 22 行 re-export shim,4 个公共符号全部保留。 - check_in_fudai_detail 5 处外部引用 - check_have_fudai_with_ready_screenshot 3 处外部引用 - check_detail_height 2 处外部引用 全部不需修改。 子包名 detection_pkg 是为了避免与同目录下的 shim 文件 douyin_detection.py 潜在的命名混淆。 回归: - 4 个新文件 + shim compileall 通过 - pytest 353 passed / 1 skipped - 旧 import 路径与新子包路径返回同一函数对象 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
23 lines
734 B
Python
23 lines
734 B
Python
"""douyin_detection - 兼容入口(保留外部 import 路径)。
|
|
|
|
实际实现位于子包 ``douyin.detection.detection_pkg``。
|
|
本文件仅 re-export 公共符号;详见各子模块文档:
|
|
- ``detection_pkg._common`` _ensure_detection_cache
|
|
- ``detection_pkg.detail`` check_detail_height / check_in_fudai_detail
|
|
- ``detection_pkg.finder`` check_have_fudai_with_ready_screenshot(最大头)
|
|
"""
|
|
|
|
from douyin.detection.detection_pkg import (
|
|
_ensure_detection_cache,
|
|
check_detail_height,
|
|
check_have_fudai_with_ready_screenshot,
|
|
check_in_fudai_detail,
|
|
)
|
|
|
|
__all__ = [
|
|
"_ensure_detection_cache",
|
|
"check_detail_height",
|
|
"check_have_fudai_with_ready_screenshot",
|
|
"check_in_fudai_detail",
|
|
]
|