Type-ignore

we can't type variables of the list-comprehension ...
This commit is contained in:
Matthias
2024-04-27 19:59:53 +02:00
parent f259270e9c
commit 997db6c706

View File

@@ -136,8 +136,13 @@ class Backtesting:
self.fee = config['fee']
logger.info(f"Using fee {self.fee:.4%} from config.")
else:
fees = [self.exchange.get_fee(symbol=self.pairlists.whitelist[0], taker_or_maker=mot)
for mot in ('taker', 'maker')]
fees = [
self.exchange.get_fee(
symbol=self.pairlists.whitelist[0],
taker_or_maker=mt, # type: ignore
)
for mt in ('taker', 'maker')
]
self.fee = max(fee for fee in fees if fee is not None)
logger.info(f"Using fee {self.fee:.4%} - worst case fee from exchange (lowest tier).")
self.precision_mode = self.exchange.precisionMode