Add type hints to manage_trade_orders,

fix content ...
This commit is contained in:
Matthias
2023-12-23 09:16:13 +01:00
parent 931704abcc
commit 15058d3ce6
+2 -2
View File
@@ -1299,7 +1299,7 @@ class FreqtradeBot(LoggingMixin):
logger.warning(f"Could not create trailing stoploss order " logger.warning(f"Could not create trailing stoploss order "
f"for pair {trade.pair}.") f"for pair {trade.pair}.")
def manage_trade_stoploss_orders(self, trade, stoploss_orders): def manage_trade_stoploss_orders(self, trade: Trade, stoploss_orders: Dict):
""" """
Perform required actions acording to existing stoploss orders of trade Perform required actions acording to existing stoploss orders of trade
:param trade: Corresponding Trade :param trade: Corresponding Trade
@@ -1307,7 +1307,7 @@ class FreqtradeBot(LoggingMixin):
:return: None :return: None
""" """
# If all stoploss orderd are canceled for some reason we add it again # If all stoploss orderd are canceled for some reason we add it again
canceled_sl_orders = [o for o in stoploss_orders if o.status in ['canceled', 'cancelled']] canceled_sl_orders = [o for o in stoploss_orders if o['status'] in ['canceled', 'cancelled']]
if ( if (
trade.is_open and trade.is_open and
len(stoploss_orders) > 0 and len(stoploss_orders) > 0 and