From 100aa624ad3f8ad466a95f9da8af30f31f77cc9c Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:24:30 +0900 Subject: fix: resolve lint issues and final integration fixes - Fix ambiguous variable name in binance_rest.py - Remove unused volumes variable in volume_profile_strategy.py - Fix import ordering in backtester main.py and test_metrics.py - Auto-format all files with ruff --- services/order-executor/src/order_executor/main.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'services/order-executor/src/order_executor/main.py') diff --git a/services/order-executor/src/order_executor/main.py b/services/order-executor/src/order_executor/main.py index 7f0578d..ab6ef4f 100644 --- a/services/order-executor/src/order_executor/main.py +++ b/services/order-executor/src/order_executor/main.py @@ -1,4 +1,5 @@ """Order Executor Service entry point.""" + import asyncio from decimal import Decimal @@ -21,7 +22,9 @@ async def run() -> None: config = ExecutorConfig() log = setup_logging("order-executor", config.log_level, config.log_format) metrics = ServiceMetrics("order_executor") - notifier = TelegramNotifier(bot_token=config.telegram_bot_token, chat_id=config.telegram_chat_id) + notifier = TelegramNotifier( + bot_token=config.telegram_bot_token, chat_id=config.telegram_chat_id + ) db = Database(config.database_url) await db.connect() @@ -69,12 +72,18 @@ async def run() -> None: event = Event.from_dict(msg) if event.type == EventType.SIGNAL: signal = event.data - log.info("processing_signal", signal_id=str(signal.id), symbol=signal.symbol) + log.info( + "processing_signal", signal_id=str(signal.id), symbol=signal.symbol + ) await executor.execute(signal) - metrics.events_processed.labels(service="order-executor", event_type="signal").inc() + metrics.events_processed.labels( + service="order-executor", event_type="signal" + ).inc() except Exception as exc: log.error("message_processing_failed", error=str(exc)) - metrics.errors_total.labels(service="order-executor", error_type="processing").inc() + metrics.errors_total.labels( + service="order-executor", error_type="processing" + ).inc() if messages: # Advance last_id to avoid re-reading — broker.read returns decoded dicts, # so we track progress by re-reading with "0" for replaying or "$" for new only. -- cgit v1.2.3