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:
@@ -1,4 +1,4 @@
|
||||
"""price_snapshot 共用:订单行情价兜底,避免 get_price 失败时整单不入 order_prices。"""
|
||||
"""price_snapshot 共用:订单行情价兜底,避免 get_price 失败时整单不入 order_prices."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Callable, Mapping, Optional, Sequence
|
||||
@@ -17,10 +17,10 @@ def resolve_order_snapshot_price(
|
||||
fallback_entry: float | None = None,
|
||||
) -> float | None:
|
||||
"""
|
||||
解析下单监控轮询用的现价/标记价,优先级:
|
||||
解析下单监控轮询用的现价/标记价,优先级:
|
||||
1. 已批量拉取的 ticker last
|
||||
2. get_symbol_mark_price(含 mark)
|
||||
3. 交易所持仓 mark(parse_ccxt_position_metrics / parse_position_mark_price)
|
||||
2. get_symbol_mark_price(含 mark)
|
||||
3. 交易所持仓 mark(parse_ccxt_position_metrics / parse_position_mark_price)
|
||||
4. 计划成交价 trigger_price
|
||||
"""
|
||||
sym = (symbol or "").strip()
|
||||
@@ -82,7 +82,7 @@ def seed_prices_from_positions(
|
||||
*,
|
||||
resolve_ex_sym_fn: Callable[[Any], str],
|
||||
) -> None:
|
||||
"""用持仓标记价补全 prices 字典(symbol 与 order_monitors 行对齐)。"""
|
||||
"""用持仓标记价补全 prices 字典(symbol 与 order_monitors 行对齐)."""
|
||||
if not all_positions or not order_rows:
|
||||
return
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user