Skip to content

Commit 7b59157

Browse files
zhassan-awstautschnig
authored andcommitted
Add import select_autoescape (#4327)
Minor refactor in benchcomp By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
1 parent 21156d2 commit 7b59157

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/benchcomp/benchcomp/visualizers/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import benchcomp
1212
import benchcomp.visualizers.utils as viz_utils
1313

14+
from jinja2 import Environment, select_autoescape
15+
1416

1517
# TODO The doc comment should appear in the help output, which should list all
1618
# available checks.
@@ -229,8 +231,8 @@ def __call__(self, results):
229231
"variants": self._get_variants(metrics),
230232
}
231233

232-
env = jinja2.Environment(
233-
loader=jinja2.BaseLoader, autoescape=jinja2.select_autoescape(
234+
env = Environment(
235+
loader=jinja2.BaseLoader, autoescape=select_autoescape(
234236
enabled_extensions=("html"),
235237
default_for_string=True))
236238
template = env.from_string(self._get_template())

0 commit comments

Comments
 (0)