Update the ruff rules and format the code (#846)

* Update the ruff rules and format the code

* Update the per-file-ignores

* Update the ci

* Update rules

* Fix codes

* Fix pagination

* Update rules
This commit is contained in:
Wu Clan
2025-10-10 19:02:49 +08:00
committed by GitHub
parent 51354593d0
commit 5762834744
269 changed files with 975 additions and 1198 deletions
-2
View File
@@ -1,2 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-2
View File
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from fastapi import APIRouter
from backend.core.conf import settings
-2
View File
@@ -1,2 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
+2 -4
View File
@@ -1,12 +1,10 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import random
from typing import Annotated
from fastapi import APIRouter, Body, Request
from backend.common.response.response_schema import response_base
from backend.common.response.response_schema import ResponseModel, response_base
from backend.common.security.jwt import DependsJwtAuth
from backend.core.conf import settings
from backend.database.db import CurrentSession
@@ -21,7 +19,7 @@ async def send_email_captcha(
request: Request,
db: CurrentSession,
recipients: Annotated[str | list[str], Body(embed=True, description='邮件接收者')],
):
) -> ResponseModel:
code = ''.join([str(random.randint(1, 9)) for _ in range(6)])
ip = request.state.ip
await redis_client.set(