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
+5 -5
View File
@@ -1,4 +1,4 @@
"""中控改委托后同步实例 order_monitors 计划价交易所已由 agent 挂单)。"""
"""中控改委托后同步实例 order_monitors 计划价(交易所已由 agent 挂单)."""
from __future__ import annotations
from typing import Any, Callable
@@ -14,7 +14,7 @@ def cond_order_role(row: dict[str, Any]) -> str | None:
def dedupe_conditional_orders_by_role(orders: list) -> list:
"""同一持仓条件单列表每种止盈/止损只保留一条避免 OKX OCO 拆分 + Flask 补全重复)。"""
"""同一持仓条件单列表:每种止盈/止损只保留一条(避免 OKX OCO 拆分 + Flask 补全重复)."""
if not orders:
return []
by_role: dict[str, dict] = {}
@@ -35,7 +35,7 @@ def dedupe_conditional_orders_by_role(orders: list) -> list:
def exchange_tpsl_from_cond_orders(cond: list) -> dict[str, Any] | None:
"""从子代理条件单列表还原 exchange_tpsl 槽位"""
"""从子代理条件单列表还原 exchange_tpsl 槽位."""
slots: dict[str, Any] = {"sl": None, "tp": None}
for row in cond or []:
if not isinstance(row, dict):
@@ -72,7 +72,7 @@ def sync_active_monitor_tpsl_prices(
*,
symbols_match: Callable[[str, str], bool],
) -> dict[str, Any]:
"""按 symbol+方向更新 active 下单监控的 stop_loss / take_profit"""
"""按 symbol+方向更新 active 下单监控的 stop_loss / take_profit."""
sym = (symbol or "").strip()
side = (direction or "").strip().lower()
if not sym:
@@ -85,7 +85,7 @@ def sync_active_monitor_tpsl_prices(
except (TypeError, ValueError):
return {"ok": False, "msg": "stop_loss / take_profit 须为数字"}
if sl <= 0 or tp <= 0:
return {"ok": False, "msg": "止损止盈须大于 0"}
return {"ok": False, "msg": "止损,止盈须大于 0"}
rows = conn.execute(
"SELECT id, symbol, exchange_symbol, direction FROM order_monitors WHERE status='active'"