Fix Python code format check issues

This commit is contained in:
yaoyao-open-source committed 2026-09-10 17:54:18 -07:00
1 parent 70be3c37e5
commit 3047c9c20a
15 files changed
+3155 -3039

No files matched your search

@@ -23,7 +23,9 @@ security = HTTPBearer(auto_error=False)
def create_access_token(user_id: str, extra_claims: dict | None = None) -> str:
"""Generate a signed JWT access token."""
expire = datetime.now(timezone.utc) + timedelta(minutes=settings.JWT_ACCESS_TOKEN_EXPIRE_MINUTES)
expire = datetime.now(timezone.utc) + timedelta(
minutes=settings.JWT_ACCESS_TOKEN_EXPIRE_MINUTES
)
to_encode = {
"sub": user_id,
"exp": expire,
@@ -48,7 +50,9 @@ def decode_access_token(token: str) -> dict:
)
async def get_current_user(credentials: HTTPAuthorizationCredentials | None = Security(security)) -> str:
async def get_current_user(
credentials: HTTPAuthorizationCredentials | None = Security(security),
) -> str:
"""FastAPI dependency to extract and verify the current user_id."""
if not credentials:
raise HTTPException(