Use constant for Strategy and hyperopt userdirpaths

This commit is contained in:
Matthias
2019-11-16 22:00:50 +01:00
parent 03cdfe8cae
commit cbb187e9b9
6 changed files with 21 additions and 16 deletions

View File

@@ -129,7 +129,7 @@ def plural(num, singular: str, plural: str = None) -> str:
return singular if (num == 1 or num == -1) else plural or singular + 's'
def render_template(template: str, arguments: dict):
def render_template(templatefile: str, arguments: dict):
from jinja2 import Environment, PackageLoader, select_autoescape
@@ -137,6 +137,6 @@ def render_template(template: str, arguments: dict):
loader=PackageLoader('freqtrade', 'templates'),
autoescape=select_autoescape(['html', 'xml'])
)
template = env.get_template(template)
template = env.get_template(templatefile)
return template.render(**arguments)