mirror of
https://ghfast.top/https://github.com/aeroxw/easy_tdx_max.git
synced 2026-09-12 16:54:20 +08:00
fix: 补齐 CI 质量门禁——mypy strict 类型标注 + ruff 行宽/导入排序
- watchlist_store/routers/watchlist: 裸 dict 补泛型参数 dict[str, object] - routers/stream: event_gen 返回 AsyncGenerator[str, None] 注解 - app: _watch_symbols 返回类型;teardown 变量改名消除类型冲突 - ruff: 5 处超长行拆行、3 处导入排序自动修复 ruff / mypy (226 files) / 1078 tests 全绿
This commit is contained in:
@@ -12,7 +12,6 @@ from easy_tdx.models.enums import Market
|
||||
from easy_tdx.web.quote_streamer import INDEX_SYMBOLS, QuoteStreamer, _is_trading_hours
|
||||
from easy_tdx.web.watchlist_store import WatchlistStore
|
||||
|
||||
|
||||
# ── WatchlistStore ──────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -147,7 +146,8 @@ def test_streamer_backpressure_drops_oldest() -> None:
|
||||
|
||||
|
||||
def test_is_trading_hours() -> None:
|
||||
from datetime import datetime, timedelta, timezone as dt_timezone
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import timezone as dt_timezone
|
||||
|
||||
tz = dt_timezone(timedelta(hours=8))
|
||||
assert _is_trading_hours(datetime(2026, 9, 1, 10, 0, tzinfo=tz)) is True # 周二盘中
|
||||
|
||||
Reference in New Issue
Block a user