formatting
This commit is contained in:
parent
bb31e64752
commit
3e2f90a32a
@ -39,7 +39,7 @@ class ExchangeResolver(IResolver):
|
|||||||
object_name=exchange_name,
|
object_name=exchange_name,
|
||||||
kwargs=kwargs)
|
kwargs=kwargs)
|
||||||
if exchange:
|
if exchange:
|
||||||
logger.info('Using resolved exchange %s from \'%s\'', exchange_name, abs_path)
|
logger.info("Using resolved exchange %s from '%s'", exchange_name, abs_path)
|
||||||
return exchange
|
return exchange
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.warning('Path "%s" does not exist', abs_path.relative_to(Path.cwd()))
|
logger.warning('Path "%s" does not exist', abs_path.relative_to(Path.cwd()))
|
||||||
|
@ -63,7 +63,7 @@ class HyperOptResolver(IResolver):
|
|||||||
hyperopt = self._search_object(directory=_path, object_type=IHyperOpt,
|
hyperopt = self._search_object(directory=_path, object_type=IHyperOpt,
|
||||||
object_name=hyperopt_name)
|
object_name=hyperopt_name)
|
||||||
if hyperopt:
|
if hyperopt:
|
||||||
logger.info('Using resolved hyperopt %s from \'%s\'', hyperopt_name, _path)
|
logger.info("Using resolved hyperopt %s from '%s'", hyperopt_name, _path)
|
||||||
return hyperopt
|
return hyperopt
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.warning('Path "%s" does not exist', _path.relative_to(Path.cwd()))
|
logger.warning('Path "%s" does not exist', _path.relative_to(Path.cwd()))
|
||||||
|
@ -47,7 +47,7 @@ class IResolver(object):
|
|||||||
:param directory: relative or absolute directory path
|
:param directory: relative or absolute directory path
|
||||||
:return: object instance
|
:return: object instance
|
||||||
"""
|
"""
|
||||||
logger.debug('Searching for %s %s in \'%s\'', object_type.__name__, object_name, directory)
|
logger.debug("Searching for %s %s in '%s'", object_type.__name__, object_name, directory)
|
||||||
for entry in directory.iterdir():
|
for entry in directory.iterdir():
|
||||||
# Only consider python files
|
# Only consider python files
|
||||||
if not str(entry).endswith('.py'):
|
if not str(entry).endswith('.py'):
|
||||||
|
@ -48,7 +48,7 @@ class PairListResolver(IResolver):
|
|||||||
object_name=pairlist_name,
|
object_name=pairlist_name,
|
||||||
kwargs=kwargs)
|
kwargs=kwargs)
|
||||||
if pairlist:
|
if pairlist:
|
||||||
logger.info('Using resolved pairlist %s from \'%s\'', pairlist_name, _path)
|
logger.info("Using resolved pairlist %s from '%s'", pairlist_name, _path)
|
||||||
return pairlist
|
return pairlist
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.warning('Path "%s" does not exist', _path.relative_to(Path.cwd()))
|
logger.warning('Path "%s" does not exist', _path.relative_to(Path.cwd()))
|
||||||
|
@ -149,7 +149,7 @@ class StrategyResolver(IResolver):
|
|||||||
strategy = self._search_object(directory=_path, object_type=IStrategy,
|
strategy = self._search_object(directory=_path, object_type=IStrategy,
|
||||||
object_name=strategy_name, kwargs={'config': config})
|
object_name=strategy_name, kwargs={'config': config})
|
||||||
if strategy:
|
if strategy:
|
||||||
logger.info('Using resolved strategy %s from \'%s\'', strategy_name, _path)
|
logger.info("Using resolved strategy %s from '%s'", strategy_name, _path)
|
||||||
strategy._populate_fun_len = len(
|
strategy._populate_fun_len = len(
|
||||||
getfullargspec(strategy.populate_indicators).args)
|
getfullargspec(strategy.populate_indicators).args)
|
||||||
strategy._buy_fun_len = len(getfullargspec(strategy.populate_buy_trend).args)
|
strategy._buy_fun_len = len(getfullargspec(strategy.populate_buy_trend).args)
|
||||||
|
Loading…
Reference in New Issue
Block a user