style: format Python files for CI

This commit is contained in:
Xiaoxia AI
2026-06-24 19:54:36 +08:00
parent 1c883ec704
commit f85e389ced
19 changed files with 583 additions and 354 deletions
+20 -22
View File
@@ -2,6 +2,7 @@
Phase 6: 前端完善 - 任务初始化脚本
将 Phase 6 的所有任务同步到推进器
"""
import sqlite3
from datetime import datetime
@@ -64,7 +65,6 @@ PHASE6_TASKS = [
"priority": "medium",
"estimated_hours": 3,
},
# Week 3: 认证页面 (5个任务)
{
"name": "登录页面",
@@ -106,7 +106,6 @@ PHASE6_TASKS = [
"priority": "high",
"estimated_hours": 4,
},
# Week 4: 工作空间管理 (6个任务)
{
"name": "工作空间列表页面",
@@ -156,7 +155,6 @@ PHASE6_TASKS = [
"priority": "medium",
"estimated_hours": 3,
},
# Week 5: 订阅管理 (5个任务)
{
"name": "套餐选择页面",
@@ -198,7 +196,6 @@ PHASE6_TASKS = [
"priority": "low",
"estimated_hours": 3,
},
# Week 6: Admin 后台 (5个任务)
{
"name": "Dashboard 仪表盘",
@@ -240,7 +237,6 @@ PHASE6_TASKS = [
"priority": "medium",
"estimated_hours": 4,
},
# Week 7: 个人中心 (4个任务)
{
"name": "个人设置页面",
@@ -274,7 +270,6 @@ PHASE6_TASKS = [
"priority": "medium",
"estimated_hours": 4,
},
# Week 8: 测试和优化 (8个任务)
{
"name": "E2E 测试:认证流程",
@@ -345,41 +340,44 @@ PHASE6_TASKS = [
def init_phase6_tasks():
"""初始化 Phase 6 任务到数据库"""
# 连接数据库
db_path = "F:/openclaw-saas/tracker.db"
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
print("[Phase 6] 开始初始化任务...")
# 插入任务
created_count = 0
for task in PHASE6_TASKS:
try:
cursor.execute("""
cursor.execute(
"""
INSERT INTO tasks (
name, description, status, phase, milestone,
priority, estimated_hours, created_at
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
""", (
task["name"],
task["description"],
"pending",
task["phase"],
task["milestone"],
task["priority"],
task["estimated_hours"],
datetime.now().isoformat()
))
""",
(
task["name"],
task["description"],
"pending",
task["phase"],
task["milestone"],
task["priority"],
task["estimated_hours"],
datetime.now().isoformat(),
),
)
created_count += 1
print(f"[OK] {task['name']}")
except Exception as e:
print(f"[ERROR] {task['name']}: {e}")
conn.commit()
conn.close()
print(f"\n[SUCCESS] Phase 6 任务初始化完成!")
print(f"📊 总计 {len(PHASE6_TASKS)} 个任务")
print(f"✅ 成功创建 {created_count} 个任务")