Merge branch 'fix/pyright-env-and-type-guards' into dev
This commit is contained in:
@@ -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 not any(k in cname for k in SUIT_EXCLUDE_KEYWORDS)
|
||||
and "套装" in cname
|
||||
):
|
||||
return it
|
||||
|
||||
# 3. 兜底匹配不带排除词的项
|
||||
for it in rows:
|
||||
|
||||
Reference in New Issue
Block a user