From 8bb454fd6cf2521a7b762c64a69823178a3c8a11 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Wed, 10 Aug 2022 14:01:02 +0200 Subject: [PATCH] Fix inifinite loop in property access A subclass of VoilaExporter would create an infinite loop with this class Foo(VoilaExporter): pass --- voila/exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voila/exporter.py b/voila/exporter.py index 8e0d4bd4d..7612836e1 100644 --- a/voila/exporter.py +++ b/voila/exporter.py @@ -105,7 +105,7 @@ async def generate_from_notebook_node(self, nb, resources=None, extra_context={} def environment(self): # enable Jinja async template execution self.enable_async = True - env = super(type(self), self).environment + env = super().environment if 'jinja2.ext.do' not in env.extensions: env.add_extension('jinja2.ext.do') return env