fix: reconcile SIGNAL_JSON段re未导入(模块级无re→函数内局部导入)

This commit is contained in:
xxm
2026-08-25 12:27:10 +08:00
parent 06dccfb2b0
commit 43c7f7d84e
+2 -1
View File
@@ -1203,7 +1203,8 @@ def reconcile_signal_from_analysis(conn, code: str) -> str:
fa, old_sig = row[0] or "", row[1] or "" fa, old_sig = row[0] or "", row[1] or ""
verdict = "" verdict = ""
# ── 2026-08-25 机器可读结论优先(SIGNAL_JSON 行存在则直接用,散文匹配降级为兜底)── # ── 2026-08-25 机器可读结论优先(SIGNAL_JSON 行存在则直接用,散文匹配降级为兜底)──
_mj = re.search(r'^SIGNAL_JSON:\s*(\{.*\})\s*$', fa, re.M) import re as _re3 # 函数内局部导入(模块级无 re
_mj = _re3.search(r'^SIGNAL_JSON:\s*(\{.*\})\s*$', fa, _re3.M)
if _mj: if _mj:
try: try:
import json as _js2 import json as _js2