use uv & make lint happy

This commit is contained in:
MingxuanGame
2025-07-23 18:03:30 +08:00
parent c0246440f3
commit 7b5a50493a
17 changed files with 2117 additions and 692 deletions

View File

@@ -1,5 +1,8 @@
from __future__ import annotations
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
try:
import redis
except ImportError:
@@ -16,6 +19,7 @@ if redis:
else:
redis_client = None
# 数据库依赖
def get_db():
db = SessionLocal()
@@ -24,6 +28,7 @@ def get_db():
finally:
db.close()
# Redis 依赖
def get_redis():
return redis_client