feat(file-check): 更新文件检核工具 API Key 配置及相关文档

This commit is contained in:
hugo committed 2026-06-17 22:29:15 +08:00
1 parent 634dee4b81
commit 55cf7ff734
74 files changed
+1525 -1182

No files matched your search

@@ -22,7 +22,7 @@ PR_NUMBER_LINE_RE = re.compile(
def normalize_reservation_id(value: Any) -> str:
"""Normalize reservation id; Excel often stores numeric ids as float."""
"""标准化 Reservation ID;处理 Excel 浮点、千分位与 x.0 尾缀。"""
if value is None:
return ""
@@ -51,7 +51,7 @@ def normalize_reservation_id(value: Any) -> str:
def extract_reservation_id(value: Any) -> str:
"""Extract reservation id from plain numeric, Excel float, or PR Number (xxx@1000140351)."""
"""从纯数字、Excel 浮点或 PR Number(xxx@1000140351)中提取 Reservation ID。"""
text = str(value or "").strip()
if not text:
return ""
@@ -73,7 +73,7 @@ def extract_reservation_id(value: Any) -> str:
def find_reservation_id_in_document(text: str) -> str:
"""Scan document text for PR Number @ reservation id or standalone @1000140351."""
"""扫描全文 PR Number 行或 @1000140351 后缀,提取文档级 Reservation ID。"""
body = str(text or "")
if not body.strip():
return ""
@@ -93,5 +93,6 @@ def find_reservation_id_in_document(text: str) -> str:
def looks_like_reservation_id(value: Any) -> bool:
"""判断标准化后的值是否符合 8~12 位纯数字 Reservation ID 格式。"""
text = normalize_reservation_id(value)
return bool(text and RESERVATION_ID_NUMERIC_RE.fullmatch(text))