in src/filter-j2.py [0:0]
def get_source(self, environment, template):
"""
Retrieves the source for a requested template. The definition of this
function is dictated by the BaseLoader class.
See: https://jinja.palletsprojects.com/en/stable/api/#jinja2.BaseLoader.get_source
"""
# Determine original template modification time (required for
# implementing the final part of the resulting tuple: a function that
# returns whether the template is up-to-date)
templatePath = Path(template)
templateModTime = templatePath.stat().st_mtime
return (
templatePath.read_text(encoding='utf-8'),
template,
lambda: templateModTime >= templatePath.stat().st_mtime
)