From 70a33a5236fd9c3b51b8db0cbaf11376f9817ac5 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:47:46 +0900 Subject: fix: lint cleanup after critical and high priority fixes --- .../strategy-engine/src/strategy_engine/main.py | 4 +++- .../strategy-engine/tests/test_multi_symbol.py | 22 ++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'services/strategy-engine') diff --git a/services/strategy-engine/src/strategy_engine/main.py b/services/strategy-engine/src/strategy_engine/main.py index 1ccef6e..4549f70 100644 --- a/services/strategy-engine/src/strategy_engine/main.py +++ b/services/strategy-engine/src/strategy_engine/main.py @@ -52,7 +52,9 @@ async def run() -> None: engine = StrategyEngine(broker=broker, strategies=strategies) health = HealthCheckServer( - "strategy-engine", port=config.health_port + HEALTH_PORT_OFFSET, auth_token=config.metrics_auth_token + "strategy-engine", + port=config.health_port + HEALTH_PORT_OFFSET, + auth_token=config.metrics_auth_token, ) health.register_check("redis", broker.ping) await health.start() diff --git a/services/strategy-engine/tests/test_multi_symbol.py b/services/strategy-engine/tests/test_multi_symbol.py index 2008c15..cb8088c 100644 --- a/services/strategy-engine/tests/test_multi_symbol.py +++ b/services/strategy-engine/tests/test_multi_symbol.py @@ -1,5 +1,5 @@ """Test that strategy engine processes multiple symbols concurrently.""" -import asyncio + import sys from pathlib import Path from unittest.mock import AsyncMock, MagicMock @@ -11,7 +11,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parents[1])) from strategy_engine.engine import StrategyEngine from shared.events import CandleEvent -from shared.models import Candle, OrderSide +from shared.models import Candle from decimal import Decimal from datetime import datetime, timezone @@ -22,17 +22,23 @@ async def test_engine_processes_multiple_streams(): broker = AsyncMock() candle_btc = Candle( - symbol="BTCUSDT", timeframe="1m", + symbol="BTCUSDT", + timeframe="1m", open_time=datetime(2025, 1, 1, tzinfo=timezone.utc), - open=Decimal("50000"), high=Decimal("51000"), - low=Decimal("49000"), close=Decimal("50000"), + open=Decimal("50000"), + high=Decimal("51000"), + low=Decimal("49000"), + close=Decimal("50000"), volume=Decimal("10"), ) candle_eth = Candle( - symbol="ETHUSDT", timeframe="1m", + symbol="ETHUSDT", + timeframe="1m", open_time=datetime(2025, 1, 1, tzinfo=timezone.utc), - open=Decimal("3000"), high=Decimal("3100"), - low=Decimal("2900"), close=Decimal("3000"), + open=Decimal("3000"), + high=Decimal("3100"), + low=Decimal("2900"), + close=Decimal("3000"), volume=Decimal("10"), ) -- cgit v1.2.3