blob: 9aaa95da483b5c9c0f66f9b4bda0618c7cbb2fb7 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# SPDX-License-Identifier: CC0-1.0
# Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
#
# Available under the terms of Creative Commons Zero v1.0 Universal.
import typing as t
from jinja2 import PackageLoader, ChoiceLoader, BaseLoader
def loader() -> BaseLoader:
return PackageLoader(__package__)
def combine_with_loaders(loaders: t.Iterable[BaseLoader]) -> BaseLoader:
return ChoiceLoader([loader(), *loaders])
|