don't use __annotate__

it is only present when typehints are used which cannot be guaranteed
for userdefined classes
This commit is contained in:
Matthias
2018-07-23 17:38:21 +01:00
parent f286ba6b87
commit 39cf0decce
3 changed files with 16 additions and 12 deletions

View File

@@ -92,6 +92,13 @@ class StrategyResolver(object):
strategy = self._search_strategy(path, strategy_name=strategy_name, config=config)
if strategy:
logger.info('Using resolved strategy %s from \'%s\'', strategy_name, path)
strategy._populate_fun_len = len(
inspect.getfullargspec(strategy.populate_indicators).args)
strategy._buy_fun_len = len(
inspect.getfullargspec(strategy.populate_buy_trend).args)
strategy._sell_fun_len = len(
inspect.getfullargspec(strategy.populate_sell_trend).args)
return import_strategy(strategy, config=config)
except FileNotFoundError:
logger.warning('Path "%s" does not exist', path)