docs: 精简项目文档并清理 Ruff 问题
This commit is contained in:
@@ -10,6 +10,7 @@ from __future__ import annotations
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from web.backend.services.login_failure import classify_failure
|
||||
|
||||
revision: str = "20261008_0052"
|
||||
|
||||
@@ -34,6 +34,8 @@ from .login import (
|
||||
test_sms_url_endpoint,
|
||||
)
|
||||
from .login import router as login_router
|
||||
from .pay import redirect_huya_pay
|
||||
from .pay import router as pay_router
|
||||
from .register import router as register_router
|
||||
from .workbench import (
|
||||
cleanup_orphan_tasks,
|
||||
@@ -52,8 +54,6 @@ from .workbench import (
|
||||
update_huya_workbench_accounts,
|
||||
ws_huya_logs,
|
||||
)
|
||||
from .pay import redirect_huya_pay
|
||||
from .pay import router as pay_router
|
||||
from .workbench import router as workbench_router
|
||||
|
||||
router = APIRouter(prefix="/api/huya", tags=["虎牙"])
|
||||
|
||||
@@ -15,7 +15,6 @@ from ...database import get_db
|
||||
from ...models import HuyaTask
|
||||
from ...services.huya_pay_link import verify_pay_token
|
||||
|
||||
|
||||
router = APIRouter(tags=["虎牙"])
|
||||
|
||||
|
||||
|
||||
@@ -67,9 +67,12 @@ def _match_suit_item(want: str, rows: list[dict[str, Any]]) -> dict[str, Any] |
|
||||
# 优先找带「套装」前缀的
|
||||
for it in rows:
|
||||
cname = str(it.get("commodityName") or "").strip()
|
||||
if core in cname and not any(k in cname for k in SUIT_EXCLUDE_KEYWORDS):
|
||||
if "套装" in cname:
|
||||
return it
|
||||
if (
|
||||
core in cname
|
||||
and "套装" in cname
|
||||
and not any(k in cname for k in SUIT_EXCLUDE_KEYWORDS)
|
||||
):
|
||||
return it
|
||||
|
||||
# 3. 兜底匹配不带排除词的项
|
||||
for it in rows:
|
||||
|
||||
Reference in New Issue
Block a user