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
+8 -8
View File
@@ -1,4 +1,4 @@
"""期权持仓监控浮盈翻倍微信提醒"""
"""期权持仓监控:浮盈翻倍微信提醒."""
from __future__ import annotations
import sqlite3
@@ -29,11 +29,11 @@ def build_profit_alert_message(
return "\n".join(
[
"【OKX期权·翻倍提醒】",
f"账户{account_label}",
f"合约{inst_id}",
f"已付权利金{premium_paid:.4f} USDC",
f"未实现盈亏{upl:+.4f} USDC{pct}",
f"当前买一{bid_txt}可考虑限价平仓锁利",
f"账户:{account_label}",
f"合约:{inst_id}",
f"已付权利金:{premium_paid:.4f} USDC",
f"未实现盈亏:{upl:+.4f} USDC({pct})",
f"当前买一:{bid_txt}(可考虑限价平仓锁利)",
]
)
@@ -48,8 +48,8 @@ def run_options_profit_alerts(
ticker_bid_fn: Callable[[str], float | None],
) -> int:
"""
对比 DB 中 open 记录与交易所持仓达到阈值发微信
返回发送条数
对比 DB 中 open 记录与交易所持仓;达到阈值发微信.
返回发送条数.
"""
sent = 0
pos_by_inst = {str(p.get("inst_id") or p.get("instId") or ""): p for p in positions}