Skip to content

Commit

Permalink
Remove typehint ignore for jinja_loader
Browse files Browse the repository at this point in the history
Fixes #21
  • Loading branch information
Siecje committed Feb 9, 2024
1 parent 0c20859 commit f3f62f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions htmd/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ def truncate_post_html(post_html: str) -> str:
app.jinja_env.globals['truncate_post_html'] = truncate_post_html


# Include current htmd site templates
app.jinja_loader = ChoiceLoader([ # type: ignore[assignment]
# Use templates in user set template folder
# but fallback to app.template_folder (example_site/templates/)
assert app.jinja_loader is not None
app.jinja_loader = ChoiceLoader([
FileSystemLoader(project_dir / app.config['TEMPLATE_FOLDER']),
app.jinja_loader, # type: ignore[list-item]
app.jinja_loader,
])


Expand Down

0 comments on commit f3f62f2

Please sign in to comment.