define constants on module level (#596)

This commit is contained in:
Michael Egger
2018-04-02 16:42:53 +02:00
committed by GitHub
parent 9cb5591007
commit 9019f6492f
7 changed files with 129 additions and 137 deletions

View File

@@ -10,7 +10,7 @@ import os
from collections import OrderedDict
from typing import Optional, Dict, Type
from freqtrade.constants import Constants
from freqtrade import constants
from freqtrade.strategy.interface import IStrategy
@@ -32,7 +32,7 @@ class StrategyResolver(object):
config = config or {}
# Verify the strategy is in the configuration, otherwise fallback to the default strategy
strategy_name = config.get('strategy') or Constants.DEFAULT_STRATEGY
strategy_name = config.get('strategy') or constants.DEFAULT_STRATEGY
self.strategy = self._load_strategy(strategy_name, extra_dir=config.get('strategy_path'))
# Set attributes