Skip to content

Commit 857f30a

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 8ba325e commit 857f30a

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
@@ -17,6 +17,8 @@
1717
import benchcomp
1818
import benchcomp.visualizers.utils as viz_utils
1919

20+
from jinja2 import Environment, select_autoescape
21+
2022

2123

2224
@dataclasses.dataclass
@@ -419,8 +421,8 @@ def __call__(self, results):
419421
"scaled_variants": self._get_scaled_variants(scaled),
420422
}
421423

422-
env = jinja2.Environment(
423-
loader=jinja2.BaseLoader, autoescape=jinja2.select_autoescape(
424+
env = Environment(
425+
loader=jinja2.BaseLoader, autoescape=select_autoescape(
424426
enabled_extensions=("html"),
425427
default_for_string=True))
426428
env.filters["safe_round"] = self._safe_round

0 commit comments

Comments
 (0)