Skip to content

Commit d6baab6

Browse files
committed
Fix flake8 issues
1 parent 73b997b commit d6baab6

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

investing_algorithm_framework/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
from investing_algorithm_framework.indicators import get_rsi, get_peaks, \
2121
is_uptrend, is_downtrend, is_crossover, is_crossunder, is_above, \
2222
is_below, has_crossed_upward, get_sma, get_up_and_downtrends, \
23-
get_rsi, get_ema, get_adx, has_crossed_downward, get_willr, \
24-
is_divergence
23+
get_ema, get_adx, has_crossed_downward, get_willr, is_divergence
2524

2625
__all__ = [
2726
"Algorithm",

investing_algorithm_framework/domain/models/backtesting/backtest_report.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,9 @@ def from_dict(data):
483483
positions = data["positions"]
484484

485485
if positions is not None:
486-
report.positions = [Position.from_dict(position) for position in positions]
486+
report.positions = [
487+
Position.from_dict(position) for position in positions
488+
]
487489

488490
trades = data["trades"]
489491

investing_algorithm_framework/domain/models/trade/trade.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ def to_dict(self):
252252
@staticmethod
253253
def from_dict(data):
254254
return Trade(
255-
buy_order_id=data["buy_order_id"] if "buy_order_id" in data else None,
256-
sell_order_id=data["sell_order_id"] if "sell_order_id" in data else None,
255+
buy_order_id=data["buy_order_id"] if "buy_order_id"
256+
in data else None,
257+
sell_order_id=data["sell_order_id"] if "sell_order_id"
258+
in data else None,
257259
target_symbol=data["target_symbol"],
258260
trading_symbol=data["trading_symbol"],
259261
amount=data["amount"],

investing_algorithm_framework/indicators/trend.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,12 @@ def is_downtrend(
8080
Function to check if the price data is in a downturn.
8181
8282
Args:
83-
data (Union[pd.DataFrame, pd.Series]): The input pandas DataFrame or Series.
84-
fast_column (str): The key for the fast moving average (default: SMA_50).
85-
slow_column (str): The key for the slow moving average (default: SMA_200).
83+
data (Union[pd.DataFrame, pd.Series]): The input pandas
84+
DataFrame or Series.
85+
fast_column (str): The key for the fast moving
86+
average (default: SMA_50).
87+
slow_column (str): The key for the slow moving
88+
average (default: SMA_200).
8689
8790
Returns:
8891
bool: Boolean indicating if the price data is in a downturn.

investing_algorithm_framework/indicators/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ def get_values_above_threshold(
554554
# Return the filtered values as a list
555555
return above_threshold.tolist()
556556

557+
557558
def get_values_below_threshold(
558559
df, column, threshold, number_of_data_points
559560
) -> int:

0 commit comments

Comments
 (0)