zzz
|
2e811e71b3
|
Merge branch 'main' into claude/wonderful-brattain-d1cfe0
|
2026-05-21 09:58:24 +08:00 |
|
 CodexandClaude Opus 4.5
|
73cfb50a2b
|
chore: 删除 fudai_core 中的未使用 import
去除大规模拆分后剩余的死 import:
- PIL.Image (未引用)
- numpy as np (未引用)
- douyin_reservation_logic (未引用)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:49:38 +08:00 |
|
 CodexandClaude Opus 4.5
|
ba4c131b2d
|
refactor: 简化 gui_app.format_gui_log_line 为薄包装
原本 64 行的 fallback 实现实际上是死代码——
gui.components.log_viewer.format_gui_log_line 一直存在,
import 失败几乎不可能发生。
简化为薄包装函数,import 失败时返回原字符串。
文件行数:5857 -> 5804(减 53 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:42:27 +08:00 |
|
 CodexandClaude Opus 4.5
|
41c3f28eb7
|
chore: 删除死文件 douyin/fudai/core/fudai_detail_reader.py
该文件只有一个函数 get_fudai_contain(1217 行),但无任何模块
import 它。所有调用方都用的是 douyin_fudai_core.get_fudai_contain。
注:本次 fudai_detail_modules/ 合并时引入的 fudai_detail_orchestrator.py
里的 get_fudai_contain 引用是从 douyin_fudai_core 来的,与本文件无关。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:36:48 +08:00 |
|
 CodexandClaude Opus 4.5
|
242876f679
|
refactor: 删除 fudai_core 中重复的 attend_choujiang 实现
attend_choujiang 在 fudai_core.py 中的旧版本只是一个回退实现:
开头就先尝试委派到 fudai_attend.attend_choujiang(更新版本),
1597 行的本地实现实际上是死代码——只在 import 失败时才会执行,
而 fudai_attend.py 一直存在。
简化为薄包装函数,直接调用 fudai_attend 中的实现。
文件行数:3799 -> 2208(减 1591 行,约 42%)
本次会话累计 fudai_core 减少:6393 -> 2208(减 4185 行,65%)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:28:52 +08:00 |
|
 CodexandClaude Opus 4.5
|
9edfcc2449
|
chore: 删除 operations/ 下的废弃存根模块
- device_operations.py:仅是空 stub(__all__ = []),无人使用
- image_operations.py:同上
- screenshot_service_new.py:未被引用的重复实现
operations/__init__.py 不导出这些模块,外部无依赖。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:22:56 +08:00 |
|
 CodexandClaude Opus 4.5
|
61ec06092d
|
refactor: 删除 fudai_core 中重复的两个超大函数
douyin_fudai_core.py 中的 should_skip_fudai_by_config (~480 行) 和
basic_join_decision (~1940 行) 与 fudai_filter.py 中的实现高度重复。
保留 fudai_filter.py 中的版本,删除 douyin_fudai_core.py 中的副本。
兼容性:保留薄包装函数,所有现有 import 路径继续工作。
文件行数:6206 -> 3799(减 2407 行,约 39%)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:16:12 +08:00 |
|
 CodexandClaude Opus 4.5
|
7d834d316f
|
refactor: 删除 fudai_core 中重复的 check_contain
check_contain 在 fudai_filter.py 中已有完全相同的实现。
通过顶部 import 直接复用,删除 douyin_fudai_core.py 中的副本。
文件行数:6250 -> 6206(减 44 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:11:45 +08:00 |
|
 CodexandClaude Opus 4.5
|
e38640eb63
|
refactor: 删除 fudai_core 中重复的 4 个开奖检查函数
check_lucky_draw_result / check_have_reward_notice_confirm /
check_in_order_confirm_page / get_reward 在 fudai_result_checker.py
中已有更新版本(使用 preprocess_for_ocr 等改进)。
douyin_fudai_core.py 中保留薄包装函数作为兼容 re-export,
确保任何旧调用点继续工作。
文件行数:6347 -> 6250(减 97 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:08:43 +08:00 |
|
 CodexandClaude Opus 4.5
|
0031f17ebc
|
refactor: 抽取 is_watch_task_fudai / _is_short_countdown_text 到 fudai_filter
douyin_fudai_core.py 中存在与 fudai_filter.py 完全重复的
is_watch_task_fudai 实现,_is_short_countdown_text 也属于过滤逻辑。
集中到 fudai_filter.py 后,douyin_fudai_core.py 保留薄包装函数
作为兼容 re-export,确保所有既有调用点继续工作。
文件行数:6393 -> 6347(减 46 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:04:40 +08:00 |
|
 CodexandClaude Opus 4.5
|
2d6cbecf7e
|
refactor: 抽取 underlying_operations 顶部辅助函数到 io_utils.py
将 4 个模块级辅助函数及相关常量从 underlying_operations.py 抽离到
新建的 douyin/core/io_utils.py:
- _verify_png_integrity
- _safe_replace_file
- _ensure_parent_dir
- _mirror_screenshot_to_external
- _EXTERNAL_DOUYIN_FUDAI_DIR / _EXTERNAL_AXF_SCREENSHOT
underlying_operations.py 仍重新导出这些符号,保持向后兼容,
所有外部 import 无需修改。
文件行数:3508 -> 3342(减 166 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 09:01:14 +08:00 |
|
 CodexandClaude Opus 4.5
|
bdde741db1
|
refactor: 删除冗余的 douyin_logger.py
douyin_logger.py 提供的 get_logger 已被 douyin_logging.get_logger 覆盖。
唯一调用处(wrapper 中的回退路径)改为使用 douyin_logging.get_logger。
douyin/logging/ 模块数:9 -> 8
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 08:57:34 +08:00 |
|
 CodexandClaude Opus 4.5
|
996990be31
|
refactor: 合并 action_tracker.py 到 action_logger.py
action_tracker.py 只有 28 行,仅定义 track_action 装饰器,
该装饰器内部依赖 ActionLogger 和 PerformanceTracker,
合并到 action_logger.py 更内聚。
douyin/logging/ 模块数:10 -> 9
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 08:55:40 +08:00 |
|
 CodexandClaude Opus 4.5
|
a065c12d0c
|
refactor: 合并 error_logger.py + debug_logger.py 到 internal_loggers.py
这两个模块只被 douyin_logging_wrapper 内部使用,外部完全不引用。
合并为单文件 internal_loggers.py 减少模块数量。
douyin/logging/ 模块数:11 -> 10
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 08:53:48 +08:00 |
|
 CodexandClaude Opus 4.5
|
b137aead48
|
refactor: 合并 fudai_detail_modules/ 到 douyin/fudai/core/
将 fudai_detail_modules/ 6 个模块全部迁移到 douyin/fudai/core/:
- fudai_detail_coupon_detection.py
- fudai_detail_operations.py
- fudai_detail_room_title.py
- fudai_detail_utils.py
- fudai_detail_validator.py
- fudai_detail_reader.py -> fudai_detail_orchestrator.py(避免与 core/ 已有同名文件冲突)
更新所有 import:
- douyin/fudai/douyin_fudai_core.py
- douyin/fudai/douyin_fudai_detail.py
删除 fudai_detail_modules/ 空目录及其 README/__init__。
验证:python -m compileall 全项目通过。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 08:46:11 +08:00 |
|
 CodexandClaude Opus 4.5
|
cb4d25abdf
|
refactor: 删除死代码 _parse_mm_ss / _extract_2digits
这两个内嵌函数定义后从未被调用(grep 验证)。
time_utils.py 中已有公共版本可供未来使用。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-05-21 00:34:19 +08:00 |
|