chore(fudai): 清理 _handle_in_fudai_detail 死代码 + 4 处重复 cleanup
- 1 处 dead code:is_second_open 重复赋值(同一变量连读两次) - 4 处内联"清除任务数量标志 + 嵌套 try"块用 _hd_helpers._clear_task_count_flag 替换 净减 50 行重复样板,2614 → 2568 行。 全套 1172 个测试通过。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0540610c75
commit
aeb51f73c7
1 file changed
+4
-50
@@ -1874,8 +1874,6 @@ class fudai_analyse:
|
||||
# 步骤1:检查是否是第二次打开福袋详情
|
||||
step1_start = time.time()
|
||||
is_second_open = getattr(self, "_fudai_detail_first_read", False)
|
||||
# 如果是第二次打开,直接点击参与,不需要验证,使用第一次的倒计时
|
||||
is_second_open = getattr(self, "_fudai_detail_first_read", False)
|
||||
if is_second_open:
|
||||
# 第二次打开:直接点击参与,不进行验证,使用第一次的倒计时
|
||||
try:
|
||||
@@ -1996,18 +1994,7 @@ class fudai_analyse:
|
||||
pass
|
||||
|
||||
# 清除任务数量标志
|
||||
try:
|
||||
self._fudai_detail_task_count_from_stage = None
|
||||
try:
|
||||
self._log_kv(
|
||||
"福袋详情",
|
||||
"_handle_in_fudai_detail:清除任务数量标志",
|
||||
log_type="DEBUG",
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
_hd_helpers._clear_task_count_flag(self)
|
||||
|
||||
# 步骤1结束计时
|
||||
step1_elapsed = (time.time() - step1_start) * 1000
|
||||
@@ -2073,18 +2060,7 @@ class fudai_analyse:
|
||||
)
|
||||
|
||||
# 清除任务数量标志
|
||||
try:
|
||||
self._fudai_detail_task_count_from_stage = None
|
||||
try:
|
||||
self._log_kv(
|
||||
"福袋详情",
|
||||
"_handle_in_fudai_detail:清除任务数量标志",
|
||||
log_type="DEBUG",
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
_hd_helpers._clear_task_count_flag(self)
|
||||
|
||||
elapsed = time.time() - start_time
|
||||
self._log_kv(
|
||||
@@ -2345,18 +2321,7 @@ class fudai_analyse:
|
||||
pass
|
||||
|
||||
# 清除任务数量标志
|
||||
try:
|
||||
self._fudai_detail_task_count_from_stage = None
|
||||
try:
|
||||
self._log_kv(
|
||||
"福袋详情",
|
||||
"_handle_in_fudai_detail:清除任务数量标志",
|
||||
log_type="DEBUG",
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
_hd_helpers._clear_task_count_flag(self)
|
||||
|
||||
elapsed = time.time() - start_time
|
||||
self._log_kv(
|
||||
@@ -2441,18 +2406,7 @@ class fudai_analyse:
|
||||
douyin_fudai_detail.close_fudai_detail(self)
|
||||
|
||||
# 清除任务数量标志
|
||||
try:
|
||||
self._fudai_detail_task_count_from_stage = None
|
||||
try:
|
||||
self._log_kv(
|
||||
"福袋详情",
|
||||
"_handle_in_fudai_detail:清除任务数量标志",
|
||||
log_type="DEBUG",
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
_hd_helpers._clear_task_count_flag(self)
|
||||
|
||||
elapsed = time.time() - start_time
|
||||
self._log_kv(
|
||||
|
||||
Reference in new issue
Block a user