style: 整理代码导入顺序并修复换行问题

1. 移除未使用的io导入和多余空行
2. 调整多个文件的fastapi导入模块顺序
3. 统一fastapi_cache导入位置
4. 修复middlewares文件末尾缺失的换行
This commit is contained in:
zhangtao
2026-07-01 00:39:32 +08:00
parent a86233d6c2
commit fa5bfc2a4f
22 changed files with 32 additions and 34 deletions
@@ -2,8 +2,10 @@ import json
import secrets
from typing import Annotated
from fastapi import APIRouter, BackgroundTasks, Depends, Path, Query, Body, Form, Request
from fastapi import APIRouter, BackgroundTasks, Body, Depends, Form, Path, Query, Request
from fastapi.responses import JSONResponse, RedirectResponse
from fastapi_cache import FastAPICache
from fastapi_cache.decorator import cache
from redis.asyncio.client import Redis
from sqlalchemy.ext.asyncio import AsyncSession
@@ -16,8 +18,6 @@ from app.core.base_schema import (
RefreshTokenPayloadSchema,
)
from app.core.dependencies import db_getter, get_current_user, redis_getter
from fastapi_cache import FastAPICache
from fastapi_cache.decorator import cache
from app.core.exceptions import CustomException
from app.core.logger import logger
from app.core.redis_crud import RedisCURD