
CodexandClaude Opus 4.7
4f147d214e
P2 §5.3: 4 处单点 importlib.import_module → 静态 from import
把单次调用 douyin_screenshot_manager 的 importlib 改为 from-import:
- douyin/core/douyin_flow_control.py
- douyin/core/underlying_operations.py
- douyin/fudai/core/fudai_debug_utils.py
- douyin/stage/douyin_stage.py
douyin_screenshot_manager 只引用 douyin.core.path_config,与上述 4 个文件
无循环依赖,可以安全静态化。bin/run_cli.py 的 importlib 是有意为之
(绕过 package __init__ 遮蔽),保留。
收益:
- 可读性 + IDE 跳转/类型提示
- 每次调用省去 ~100µs 的 import_module 开销
回归:140 .py 编译通过;4 处 importlib 残留全清;
test_filter_logging / check_web_gui_config_sync 通过;
douyin_screenshot_manager 仍可正常加载。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 12:01:16 +08:00
..
2026-05-21 11:43:44 +08:00
2026-01-02 23:57:03 +08:00
2026-05-21 12:01:16 +08:00
2026-05-21 10:18:17 +08:00
2026-01-07 19:06:10 +08:00
2026-05-21 09:01:14 +08:00
2026-05-21 10:18:17 +08:00
2026-05-21 12:01:16 +08:00
2026-05-21 00:23:14 +08:00