From 6e5c14a95b50871ef61d4e62f0df38d8dbab419f Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 24 Mar 2018 18:14:05 +0100 Subject: [PATCH] fix mutable default argument --- freqtrade/strategy/resolver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freqtrade/strategy/resolver.py b/freqtrade/strategy/resolver.py index 74391c85d..583f24a3f 100644 --- a/freqtrade/strategy/resolver.py +++ b/freqtrade/strategy/resolver.py @@ -7,6 +7,7 @@ import importlib import os import sys from collections import OrderedDict +from typing import Optional, Dict from pandas import DataFrame @@ -21,12 +22,14 @@ class StrategyResolver(object): """ This class contains all the logic to load custom strategy class """ - def __init__(self, config: dict = {}) -> None: + def __init__(self, config: Optional[Dict] = None) -> None: """ Load the custom class from config parameter :param config: :return: """ + config = config or {} + self.logger = Logger(name=__name__).get_logger() # Verify the strategy is in the configuration, otherwise fallback to the default strategy