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
+16 -16
View File
@@ -1,9 +1,9 @@
"""
每日自动划转北京时间指定整点小时内将交易账户(AUTO_TRANSFER_TO)余额调整至目标额
每日自动划转:北京时间指定整点小时内,将交易账户(AUTO_TRANSFER_TO)余额调整至目标额.
- 交易账户 < 目标从资金账户划入差额
- 交易账户 > 目标将多余划回资金账户
- 有 active 持仓不划转写账簿并企业微信说明
- 交易账户 < 目标:从资金账户划入差额
- 交易账户 > 目标:将多余划回资金账户
- 有 active 持仓:不划转,写账簿并企业微信说明
"""
from __future__ import annotations
@@ -65,12 +65,12 @@ def run_auto_transfer_once_per_day(
active = get_active_position_count(conn)
if active > 0:
msg = f"持仓中{active}),本次资金无划转"
msg = f"持仓中({active}),本次资金无划转"
_log(0, from_account, to_account, "skipped", msg)
send_wechat_msg(
f"自动划转{msg}\n"
f"目标{to_account} 调整至 {round(float(target_amount), funds_decimals)}U\n"
f"账簿日(UTC){transfer_day}|触发时刻(北京){app_now_str()}"
f"自动划转:{msg}\n"
f"目标:{to_account} 调整至 {round(float(target_amount), funds_decimals)}U\n"
f"账簿日(UTC):{transfer_day}|触发时刻(北京):{app_now_str()}"
)
return
@@ -95,7 +95,7 @@ def run_auto_transfer_once_per_day(
from_account,
to_account,
"skipped",
f"{to_account}账户已为{trade}U目标{target}U",
f"{to_account}账户已为{trade}U(目标{target}U)",
)
return
@@ -109,10 +109,10 @@ def run_auto_transfer_once_per_day(
from_bal = get_account_usdt_total(fr)
if from_bal is not None and round(float(from_bal), funds_decimals) < amount:
cur = round(float(from_bal), funds_decimals)
_log(amount, fr, to, "failed", f"{fr}账户USDT不足{amount}U当前{cur}U")
_log(amount, fr, to, "failed", f"{fr}账户USDT不足,{amount}U,当前{cur}U")
send_wechat_msg(
f"自动划转失败{fr}余额不足{amount}U当前{cur}U{action}{to_account}目标{target}U\n"
f"账簿日(UTC){transfer_day}|触发时刻(北京){app_now_str()}"
f"自动划转失败:{fr}余额不足,{amount}U,当前{cur}U({action}{to_account}目标{target}U)\n"
f"账簿日(UTC):{transfer_day}|触发时刻(北京):{app_now_str()}"
)
return
@@ -120,11 +120,11 @@ def run_auto_transfer_once_per_day(
_log(amount, fr, to, "success" if ok else "failed", msg)
if ok:
send_wechat_msg(
f"自动划转成功{to_account} {trade}U→目标{target}U{action}{amount}U {fr}->{to}\n"
f"账簿日(UTC){transfer_day}|触发时刻(北京){app_now_str()}"
f"自动划转成功:{to_account} {trade}U→目标{target}U,{action}{amount}U {fr}->{to}\n"
f"账簿日(UTC):{transfer_day}|触发时刻(北京):{app_now_str()}"
)
else:
send_wechat_msg(
f"自动划转失败计划{action}{amount}U {fr}->{to}目标{target}U\n原因{msg}\n"
f"账簿日(UTC){transfer_day}|触发时刻(北京){app_now_str()}"
f"自动划转失败:计划{action}{amount}U {fr}->{to}(目标{target}U)\n原因:{msg}\n"
f"账簿日(UTC):{transfer_day}|触发时刻(北京):{app_now_str()}"
)