style: 修复scripts目录ruff F841/B007/F401/F541问题(9个文件)
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m10s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 55s
CI/CD Pipeline / Frontend Lint (push) Successful in 27s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 1m48s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 4m44s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m46s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 41s
CI/CD Pipeline / Integration Tests (push) Successful in 2m17s
CI/CD Pipeline / Unit Tests (push) Successful in 5m4s
CI/CD Pipeline / Build Staging API Image (push) Successful in 14m18s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m16s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 14s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 14s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 41s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1298h18m57s
CI/CD Pipeline / Deploy Production (push) Failing after 1298h20m38s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1298h26m57s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1298h26m59s
CI/CD Pipeline / Build Production API Image (push) Failing after 1298h27m1s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 1298h35m54s
CI/CD Pipeline / PR Build API Image (push) Failing after 1298h35m58s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 1298h37m31s
CI/CD Pipeline / PR Build Web Image (push) Failing after 1299h8m23s

修复scripts目录下ruff检测到的18个问题:F841未使用变量6处、F401未使用import 10处、B007未使用循环变量1处、F541 f-string缺少占位符1处。
This commit was merged in pull request #822.
This commit is contained in:
2026-07-24 12:49:07 +08:00
parent 5215e868f7
commit 627bd5b6a2
6 changed files with 15 additions and 16 deletions
+3 -3
View File
@@ -44,7 +44,7 @@ def api_get(path):
time.sleep(2**attempt)
continue
raise
except Exception as e:
except Exception:
if attempt < 2:
time.sleep(2**attempt)
continue
@@ -100,7 +100,7 @@ def send_alert(pr_num, pr_title, pr_url, head_sha, commit_age_min):
print(" ⚠️ 未配置CI_NOTIFY_WEBHOOK,跳过告警")
return
gitea_url = get_env("GITEA_URL", "https://git.xiaoxiajianji.com")
get_env("GITEA_URL", "https://git.xiaoxiajianji.com")
content = {
"msg_type": "interactive",
@@ -202,7 +202,7 @@ def main():
# 少于2分钟的跳过,给CI一点启动时间
if age_min < 2:
print(f" ⏳ 刚更新,等待CI启动...")
print(" ⏳ 刚更新,等待CI启动...")
continue
# 获取commit状态