From 7d76ee2e65b2588d016490eba1c99bc1ec747764 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 25 Feb 2024 09:11:47 +0800 Subject: [PATCH] fix warning --- app/api/endpoints/plugin.py | 4 ++-- app/api/endpoints/webhook.py | 1 - app/db/downloadhistory_oper.py | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/api/endpoints/plugin.py b/app/api/endpoints/plugin.py index c3b020b3..d6bc77e4 100644 --- a/app/api/endpoints/plugin.py +++ b/app/api/endpoints/plugin.py @@ -7,8 +7,8 @@ from app.core.plugin import PluginManager from app.core.security import verify_token from app.db.systemconfig_oper import SystemConfigOper from app.helper.plugin import PluginHelper -from app.schemas.types import SystemConfigKey from app.scheduler import Scheduler +from app.schemas.types import SystemConfigKey router = APIRouter() @@ -118,7 +118,7 @@ def plugin_page(plugin_id: str, _: schemas.TokenPayload = Depends(verify_token)) @router.get("/reset/{plugin_id}", summary="重置插件配置", response_model=schemas.Response) -def reset_plugin(plugin_id: str, _: schemas.TokenPayload = Depends(verify_token)) -> List[dict]: +def reset_plugin(plugin_id: str, _: schemas.TokenPayload = Depends(verify_token)) -> Any: """ 根据插件ID重置插件配置 """ diff --git a/app/api/endpoints/webhook.py b/app/api/endpoints/webhook.py index 4f71f6ee..cdb92426 100644 --- a/app/api/endpoints/webhook.py +++ b/app/api/endpoints/webhook.py @@ -4,7 +4,6 @@ from fastapi import APIRouter, BackgroundTasks, Request, Depends from app import schemas from app.chain.webhook import WebhookChain -from app.core.config import settings from app.core.security import verify_uri_token router = APIRouter() diff --git a/app/db/downloadhistory_oper.py b/app/db/downloadhistory_oper.py index 4348f6e4..23020625 100644 --- a/app/db/downloadhistory_oper.py +++ b/app/db/downloadhistory_oper.py @@ -1,4 +1,3 @@ -from pathlib import Path from typing import List from app.db import DbOper