mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 16:54:17 +08:00
fix: exclude .pyi from ruff + fix unused variable in test
This commit is contained in:
@@ -34,6 +34,7 @@ module = "easy_tdx.MyTT"
|
|||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
target-version = "py310"
|
target-version = "py310"
|
||||||
line-length = 100
|
line-length = 100
|
||||||
|
extend-exclude = ["*.pyi"]
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["E", "F", "I", "UP"]
|
select = ["E", "F", "I", "UP"]
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ def test_chanlun_manual_result_overrides_auto():
|
|||||||
# Pass explicit result — should NOT auto-compute
|
# Pass explicit result — should NOT auto-compute
|
||||||
manual_result = {"manual": True}
|
manual_result = {"manual": True}
|
||||||
engine = BacktestEngine(CheckerStrategy, cash=100000, chanlun_level="DAILY")
|
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
|
# Strategy should have received the manual result, not auto-computed one
|
||||||
assert CheckerStrategy.received == manual_result
|
assert CheckerStrategy.received == manual_result
|
||||||
|
|||||||
Reference in New Issue
Block a user