]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Simplify example for ModuleLoader 1695/head
authorCharles-Axel Dein <120501+charlax@users.noreply.github.com>
Tue, 26 Jul 2022 09:03:16 +0000 (11:03 +0200)
committerDavid Lord <davidism@gmail.com>
Wed, 18 Dec 2024 18:07:18 +0000 (10:07 -0800)
The `ModuleLoader` example seems copy pasted from `ChoiceLoader`. As a result it's not immediately clear how their API differ.

src/jinja2/loaders.py

index b1ad401c06e05c4637a8e88bb4bfdedd7580cf65..d2373e5e7f77cd6fe76da00534bab75d1c3a1f5d 100644 (file)
@@ -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`.
     """