Skip to content

Commit 7d5432e

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 a2101d3 commit 7d5432e

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
@@ -13,6 +13,8 @@
1313
import benchcomp
1414
import benchcomp.visualizers.utils as viz_utils
1515

16+
from jinja2 import Environment, select_autoescape
17+
1618

1719

1820
@dataclasses.dataclass
@@ -271,8 +273,8 @@ def __call__(self, results):
271273
"variants": self._get_variants(metrics),
272274
}
273275

274-
env = jinja2.Environment(
275-
loader=jinja2.BaseLoader, autoescape=jinja2.select_autoescape(
276+
env = Environment(
277+
loader=jinja2.BaseLoader, autoescape=select_autoescape(
276278
enabled_extensions=("html"),
277279
default_for_string=True))
278280
template = env.from_string(self._get_template())

0 commit comments

Comments
 (0)