From bd373b9c3cee552bb58c7ea776a7934f774c4e6c Mon Sep 17 00:00:00 2001 From: Justin Gu <97915@qq.com> Date: Thu, 11 Jun 2026 04:06:52 +0800 Subject: [PATCH] fix: exclude .pyi from ruff + fix unused variable in test --- pyproject.toml | 1 + tests/unit/test_backtest_engine.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e51d67f..8b27fcc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,7 @@ module = "easy_tdx.MyTT" [tool.ruff] target-version = "py310" line-length = 100 +extend-exclude = ["*.pyi"] [tool.ruff.lint] select = ["E", "F", "I", "UP"] diff --git a/tests/unit/test_backtest_engine.py b/tests/unit/test_backtest_engine.py index 1216f96..55fefdc 100644 --- a/tests/unit/test_backtest_engine.py +++ b/tests/unit/test_backtest_engine.py @@ -548,7 +548,7 @@ def test_chanlun_manual_result_overrides_auto(): # Pass explicit result — should NOT auto-compute manual_result = {"manual": True} engine = BacktestEngine(CheckerStrategy, cash=100000, chanlun_level="DAILY") - result = engine.run(df, chanlun_result=manual_result) + engine.run(df, chanlun_result=manual_result) # Strategy should have received the manual result, not auto-computed one assert CheckerStrategy.received == manual_result