From 792e27e757e0e6533e7acd155d14e4252171e2ff Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sun, 14 Jun 2026 14:20:39 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"[moz]=20fix(api):=20flake8=20lint=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E2=80=94=20=E7=A7=BB=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20import"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c08b891c42028ccfa9202c371927f0bcbc9fbe71. --- src/api/shared.py | 4 ++-- src/api/task_routes.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/shared.py b/src/api/shared.py index 77d2d5b..450886e 100644 --- a/src/api/shared.py +++ b/src/api/shared.py @@ -1,5 +1,6 @@ """共享 helper 和常量""" +from pathlib import Path from typing import Any, Dict from fastapi import HTTPException @@ -55,8 +56,7 @@ def _init_agent_ids(): if _KNOWN_AGENT_IDS: return try: - import yaml - import os + import yaml, os cfg_path = os.path.join(os.path.dirname(__file__), "..", "..", "config", "default.yaml") with open(cfg_path) as f: cfg = yaml.safe_load(f) diff --git a/src/api/task_routes.py b/src/api/task_routes.py index d3a71e5..dd6a541 100644 --- a/src/api/task_routes.py +++ b/src/api/task_routes.py @@ -19,6 +19,7 @@ from src.api.shared import ( _bb, _q, _task_to_dict, + _validate_project, _extract_mentions, )