完成 Ruff 全量清理
This commit is contained in:
@@ -86,7 +86,7 @@ def validate_goods_materials(
|
||||
def validate_mall_materials(transform_fixed: dict[str, Any]) -> None:
|
||||
"""校验 mall 固定槽模板;动态槽仍由当前会话的 GetPayToken 填充。"""
|
||||
if not isinstance(transform_fixed, dict):
|
||||
raise ValueError("mall transform-fixed 必须是对象")
|
||||
raise TypeError("mall transform-fixed 必须是对象")
|
||||
required = {
|
||||
str(index) for index in (1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17)
|
||||
}
|
||||
@@ -95,7 +95,7 @@ def validate_mall_materials(transform_fixed: dict[str, Any]) -> None:
|
||||
raise ValueError(f"mall transform-fixed 缺少槽: {', '.join(missing)}")
|
||||
for index in required:
|
||||
if not isinstance(transform_fixed[index], list):
|
||||
raise ValueError(f"mall transform-fixed 槽 {index} 不是数组")
|
||||
raise TypeError(f"mall transform-fixed 槽 {index} 不是数组")
|
||||
|
||||
|
||||
def goods_material_diagnostics(
|
||||
|
||||
Reference in New Issue
Block a user