refactor(okww): 重构配置优化#202
Merged
1w1w11w1 merged 1 commit intoMay 26, 2026
Merged
Conversation
消除 hasattr() 反模式,原子化文件夹配置同步,完善崩溃恢复路径
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
hasattr()防御性编程反模式,temp_path/script_config_path在__init__中显式初始化为None,对齐 General 模块模式.tmp再rename),避免中途崩溃导致配置损坏on_crash()补充 UserConfig 写回,防止崩溃时丢失 ProxyTimes 等运行时状态prepare()去掉多余的rmtree,保留上次崩溃遗留的备份final_task()状态赋值移到finallyunlock 之后变更文件
app/task/Okww/manager.py— 主要改动app/task/Okww/AutoProxy.py—set_okww()原子化res/version.json— 版本日志