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 @@
"""中控资金统计期权 USDC/USDT 按 1:1 计入 USDT 合计"""
"""中控资金统计:期权 USDC/USDT 按 1:1 计入 USDT 合计."""
from __future__ import annotations
from typing import Any, Optional
@@ -23,7 +23,7 @@ def _account_total_usdt(funding: Any, trading: Any) -> Optional[float]:
def stablecoin_usdt_equiv(value: Any) -> Optional[float]:
"""USDC / USDT 按 1:1 折算为 USDT 统计口径"""
"""USDC / USDT 按 1:1 折算为 USDT 统计口径."""
return _safe_float(value)
@@ -36,7 +36,7 @@ def _sum_optional(*values: Any) -> Optional[float]:
def options_balances_usdt_equiv(options_snap: dict[str, Any] | None) -> dict[str, Any]:
"""从期权 snapshot 提取资金户/交易户 USDT 等价余额"""
"""从期权 snapshot 提取资金户/交易户 USDT 等价余额."""
snap = options_snap if isinstance(options_snap, dict) else {}
if snap.get("enabled") is False:
return {"ok": False, "funding_usdt": None, "trading_usdt": None}
@@ -80,7 +80,7 @@ def merge_perp_options_balances(
perpetual_trading_usdt: Any,
options_snap: dict[str, Any] | None,
) -> dict[str, Any]:
"""永续 + 期权余额合并为中控 USDT 统计口径"""
"""永续 + 期权余额合并为中控 USDT 统计口径."""
opt = options_balances_usdt_equiv(options_snap)
funding = _sum_optional(perpetual_funding_usdt, opt.get("funding_usdt"))
trading = _sum_optional(perpetual_trading_usdt, opt.get("trading_usdt"))
@@ -104,7 +104,7 @@ def merge_perp_options_balances(
def merge_board_row_balances(row: dict[str, Any]) -> dict[str, Any]:
"""监控板行 → 含期权的资金统计"""
"""监控板行 → 含期权的资金统计."""
caps = row.get("capabilities") or []
options_snap = row.get("options") if "options" in caps else None
merged = merge_perp_options_balances(