From: Charles-Axel Dein <120501+charlax@users.noreply.github.com> Date: Tue, 26 Jul 2022 09:03:16 +0000 (+0200) Subject: Simplify example for ModuleLoader X-Git-Tag: 3.1.5~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1695%2Fhead;p=thirdparty%2Fjinja.git Simplify example for ModuleLoader The `ModuleLoader` example seems copy pasted from `ChoiceLoader`. As a result it's not immediately clear how their API differ. --- diff --git a/src/jinja2/loaders.py b/src/jinja2/loaders.py index b1ad401c..d2373e5e 100644 --- a/src/jinja2/loaders.py +++ b/src/jinja2/loaders.py @@ -613,10 +613,7 @@ class ModuleLoader(BaseLoader): Example usage: - >>> loader = ChoiceLoader([ - ... ModuleLoader('/path/to/compiled/templates'), - ... FileSystemLoader('/path/to/templates') - ... ]) + >>> loader = ModuleLoader('/path/to/compiled/templates') Templates can be precompiled with :meth:`Environment.compile_templates`. """