Skip to content

Commit

Permalink
factorize create_all_type_evaluators
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume De Saint Martin committed Jan 12, 2020
1 parent ee904c9 commit 3898127
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions octobot_evaluators/api/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,26 +133,6 @@ async def create_all_type_evaluators(config, exchange_name,
symbols=None,
time_frames=None,
relevant_evaluators=CONFIG_WILDCARD) -> list:
created_evaluators = []

created_evaluators += await create_evaluators(EvaluatorClassTypes[EvaluatorMatrixTypes.TA.value],
config, exchange_name, symbols=symbols, time_frames=time_frames,
cryptocurrencies=cryptocurrencies,
relevant_evaluators=relevant_evaluators)

created_evaluators += await create_evaluators(EvaluatorClassTypes[EvaluatorMatrixTypes.SOCIAL.value],
config, exchange_name, symbols=symbols, time_frames=time_frames,
cryptocurrencies=cryptocurrencies,
relevant_evaluators=relevant_evaluators)

created_evaluators += await create_evaluators(EvaluatorClassTypes[EvaluatorMatrixTypes.REAL_TIME.value],
config, exchange_name, symbols=symbols, time_frames=time_frames,
cryptocurrencies=cryptocurrencies,
relevant_evaluators=relevant_evaluators)

created_evaluators += await create_evaluators(EvaluatorClassTypes[EvaluatorMatrixTypes.STRATEGIES.value],
config, exchange_name, symbols=symbols, time_frames=time_frames,
cryptocurrencies=cryptocurrencies,
relevant_evaluators=relevant_evaluators)

return created_evaluators
return [await create_evaluators(evaluator_type, config, exchange_name, symbols=symbols, time_frames=time_frames,
cryptocurrencies=cryptocurrencies, relevant_evaluators=relevant_evaluators)
for evaluator_type in EvaluatorClassTypes.values()]

0 comments on commit 3898127

Please sign in to comment.