fix(datasource): 类型注解使用字符串前向引用避免运行时错误

This commit is contained in:
2026-06-22 21:45:00 +08:00
parent 1260d53254
commit 3f73687a59

View File

@@ -117,7 +117,7 @@ class CCXTSource:
self._proxy_started = False self._proxy_started = False
print("socks2http 代理已停止") print("socks2http 代理已停止")
def _create_exchange(self) -> Optional[ccxt.Exchange]: def _create_exchange(self) -> Optional['ccxt.Exchange']:
"""创建交易所实例""" """创建交易所实例"""
if not CCXT_AVAILABLE: if not CCXT_AVAILABLE:
return None return None