完成 Ruff 全量清理

This commit is contained in:
yml2213
2026-08-31 10:55:44 +08:00
parent 840af3108e
commit 09ab80e062
68 changed files with 323 additions and 291 deletions
@@ -258,7 +258,7 @@ class AccountCheckRunner:
stop_event=self._stop,
api_strategy=WgapiLoginAPI(),
).check_account()
except Exception as exc:
except Exception as exc: # noqa: BLE001 外部接口与任务边界需要保留宽泛异常兜底
self._set_item(
index, status="error", message=f"检测异常: {exc}", finished_at=_now()
)
@@ -319,7 +319,7 @@ class AccountCheckRunner:
with self._lock:
items = list(self.batch.items)
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
timestamp = datetime.now(UTC).strftime("%Y%m%d_%H%M%S")
buffer = io.BytesIO()
with zipfile.ZipFile(buffer, "w", compression=zipfile.ZIP_DEFLATED) as zf:
for status in EXPORT_STATUS_ORDER:
@@ -367,7 +367,7 @@ class AccountCheckRunner:
for future in as_completed(futures):
future.result()
except Exception as exc:
except Exception as exc: # noqa: BLE001 外部接口与任务边界需要保留宽泛异常兜底
self._set_batch(
status="error", message=f"批次执行异常: {exc}", finished_at=_now()
)