From adf5e96542ebd65c7d13ca5e9825071183b3ef13 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:06:49 +0900 Subject: fix: lint fixes for integration tests and backtester noqa annotations --- cli/src/trading_cli/commands/data.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'cli/src/trading_cli') diff --git a/cli/src/trading_cli/commands/data.py b/cli/src/trading_cli/commands/data.py index 5c6f274..2810a07 100644 --- a/cli/src/trading_cli/commands/data.py +++ b/cli/src/trading_cli/commands/data.py @@ -20,9 +20,7 @@ def data(): @click.option("--timeframe", default="1m", show_default=True, help="Candle timeframe") def collect(symbol, timeframe): """Start collecting live market data for a symbol.""" - click.echo( - f"To collect live data for {symbol} at {timeframe}, run the data-collector service:" - ) + click.echo(f"To collect live data for {symbol} at {timeframe}, run the data-collector service:") click.echo() click.echo(" docker compose up -d data-collector") click.echo() @@ -63,7 +61,10 @@ def history(symbol, timeframe, since, limit): dt = datetime.fromisoformat(since).replace(tzinfo=timezone.utc) since_ms = int(dt.timestamp() * 1000) except ValueError: - click.echo(f"Error: Invalid date format '{since}'. Use ISO format (e.g. 2024-01-01).", err=True) + click.echo( + f"Error: Invalid date format '{since}'. Use ISO format (e.g. 2024-01-01).", + err=True, + ) sys.exit(1) else: # Default: fetch from 1000 candles ago (approximate) @@ -75,19 +76,19 @@ def history(symbol, timeframe, since, limit): base = symbol.replace("USDT", "") ccxt_symbol = f"{base}/USDT" - exchange = ccxt.binance({ - "apiKey": settings.binance_api_key, - "secret": settings.binance_api_secret, - }) + exchange = ccxt.binance( + { + "apiKey": settings.binance_api_key, + "secret": settings.binance_api_secret, + } + ) try: kwargs = {"limit": limit} if since_ms is not None: kwargs["since"] = since_ms - candles = await fetch_historical_candles( - exchange, ccxt_symbol, timeframe, **kwargs - ) + candles = await fetch_historical_candles(exchange, ccxt_symbol, timeframe, **kwargs) count = 0 for candle in candles: -- cgit v1.2.3