diff --git a/freqtrade/util/template_renderer.py b/freqtrade/util/template_renderer.py index 362d0f875..6969c4c93 100644 --- a/freqtrade/util/template_renderer.py +++ b/freqtrade/util/template_renderer.py @@ -3,7 +3,10 @@ Jinja2 rendering utils, used to generate new strategy and configurations. """ -def render_template(templatefile: str, arguments: dict = {}) -> str: +from typing import Dict + + +def render_template(templatefile: str, arguments: Dict) -> str: from jinja2 import Environment, PackageLoader, select_autoescape diff --git a/tests/utils/test_rendering_utils.py b/tests/utils/test_rendering_utils.py index 7d52b4f26..e03307ff1 100644 --- a/tests/utils/test_rendering_utils.py +++ b/tests/utils/test_rendering_utils.py @@ -7,7 +7,9 @@ def test_render_template_fallback(): from jinja2.exceptions import TemplateNotFound with pytest.raises(TemplateNotFound): val = render_template( - templatefile='subtemplates/indicators_does-not-exist.j2',) + templatefile='subtemplates/indicators_does-not-exist.j2', + arguments={}, + ) val = render_template_with_fallback( templatefile='strategy_subtemplates/indicators_does-not-exist.j2',