From 70f4e026f1a873fa6ddbc03a0702a830789f30f9 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sun, 7 Jun 2026 11:57:38 +0800 Subject: [PATCH] auto-sync: 2026-06-07 11:57:38 --- src/api/toolchain_routes.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api/toolchain_routes.py b/src/api/toolchain_routes.py index b22d1fa..5faed9a 100644 --- a/src/api/toolchain_routes.py +++ b/src/api/toolchain_routes.py @@ -15,7 +15,7 @@ import logging import os import time from datetime import datetime -from pathlib import PurePath +from pathlib import Path, PurePath from typing import Any, Dict, List, Optional, Set, Tuple import httpx @@ -134,9 +134,8 @@ def _calc_risk_level(changed_files: List[str]) -> str: MAIL_PROJECT_ID = "_mail" -def _mail_db_path() -> "Path": +def _mail_db_path() -> Path: """获取 Mail 数据库路径,确保目录存在。""" - from pathlib import Path as P root = get_data_root() db = root / MAIL_PROJECT_ID / "blackboard.db" db.parent.mkdir(parents=True, exist_ok=True)