From df036544398789ad2c155fd77f24ef1cbab68a3c Mon Sep 17 00:00:00 2001 From: Peter Dekkers Date: Wed, 21 Feb 2024 23:34:13 +0100 Subject: [PATCH] fixed flake8 finding --- .flake8 | 2 +- roboquant/__init__.py | 3 --- tests/unit/test_candlestrategy.py | 6 +++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.flake8 b/.flake8 index 2bca69d..6ca787e 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -max-line-length = 127 +max-line-length = 127 per-file-ignores = # imported but unused __init__.py: F401 diff --git a/roboquant/__init__.py b/roboquant/__init__.py index 5a0fbfe..5c11622 100644 --- a/roboquant/__init__.py +++ b/roboquant/__init__.py @@ -1,4 +1,3 @@ - __version__ = "0.2.1" from .account import Account, OptionAccount, Position @@ -34,5 +33,3 @@ EventChannel, feedutil, ) - - diff --git a/tests/unit/test_candlestrategy.py b/tests/unit/test_candlestrategy.py index 36806f2..29e2aec 100644 --- a/tests/unit/test_candlestrategy.py +++ b/tests/unit/test_candlestrategy.py @@ -5,12 +5,12 @@ class _MyStrategy(CandleStrategy): - """Example using talib to create a strategy""" + """Example using CandleStrategy to create a custom strategy""" - def _create_signal(self, _, ohlcv: OHLCVBuffer) -> Signal | None: + def _create_signal(self, symbol, ohlcv: OHLCVBuffer) -> Signal | None: close = ohlcv.close() sma12 = close[-12:].mean() - sma26 = close[-26:].mean() # type: ignore + sma26 = close[-26:].mean() if sma12 > sma26: return Signal.buy() if sma12 < sma26: