Normalize fullwidth punctuation to ASCII across codebase.

Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 23:42:26 +08:00
parent aaa72c7961
commit b733e551a0
392 changed files with 71522 additions and 71369 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
"""防重复提交Flask session 短窗口去重下单 / 关键位等)。"""
"""防重复提交:Flask session 短窗口去重(下单 / 关键位等)."""
from __future__ import annotations
import time
@@ -19,8 +19,8 @@ def check_duplicate_submit(
ttl: float = DEFAULT_SUBMIT_GUARD_TTL,
) -> Optional[str]:
"""
同一 scope 在 ttl 秒内仅允许通过一次
返回提示文案表示应拒绝返回 None 表示可继续处理
同一 scope 在 ttl 秒内仅允许通过一次.
返回提示文案表示应拒绝;返回 None 表示可继续处理.
"""
scope = (scope or "").strip()
if not scope:
@@ -28,7 +28,7 @@ def check_duplicate_submit(
now = time.time()
locks = _prune_locks(session.get("_form_submit_guard") or {}, now)
if scope in locks:
return "请求正在处理或刚提交过请勿重复点击请等待页面刷新后再试"
return "请求正在处理或刚提交过,请勿重复点击(请等待页面刷新后再试)"
locks[scope] = now + float(ttl)
session["_form_submit_guard"] = locks
try: