fix (frozen=True, slots=True)

This commit is contained in:
2026-09-05 13:56:04 +08:00
parent 58e1e3e291
commit 2059f87fe5
8 changed files with 23 additions and 23 deletions

View File

@@ -7,7 +7,7 @@ from pathlib import Path
import yaml
@dataclass(slots=True)
@dataclass(frozen=True, slots=True)
class SignalConfig:
"""单个交易信号的数据源及开仓限制配置。"""
@@ -21,7 +21,7 @@ class SignalConfig:
gt_last_price_is_open: bool = False
@dataclass(slots=True)
@dataclass(frozen=True, slots=True)
class GlobalConfig:
"""所有主机共享的系统配置。"""
@@ -37,7 +37,7 @@ class GlobalConfig:
signals: dict[str, SignalConfig] = field(default_factory=dict)
@dataclass(slots=True)
@dataclass(frozen=True, slots=True)
class AccountConfig:
"""当前主机所使用的账户及交易策略参数。"""