Skip to content

Commit

Permalink
Fix jinja_loader typehint (#5389)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Feb 3, 2024
2 parents 3207af8 + ecc057d commit 3435d2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -3,6 +3,8 @@ Version 3.0.2

Unreleased

- Correct type for ``jinja_loader`` property. :issue:`5388`


Version 3.0.1
-------------
Expand Down
3 changes: 2 additions & 1 deletion src/flask/sansio/scaffold.py
Expand Up @@ -9,6 +9,7 @@
from functools import update_wrapper

import click
from jinja2 import BaseLoader
from jinja2 import FileSystemLoader
from werkzeug.exceptions import default_exceptions
from werkzeug.exceptions import HTTPException
Expand Down Expand Up @@ -272,7 +273,7 @@ def static_url_path(self, value: str | None) -> None:
self._static_url_path = value

@cached_property
def jinja_loader(self) -> FileSystemLoader | None:
def jinja_loader(self) -> BaseLoader | None:
"""The Jinja loader for this object's templates. By default this
is a class :class:`jinja2.loaders.FileSystemLoader` to
:attr:`template_folder` if it is set.
Expand Down

0 comments on commit 3435d2f

Please sign in to comment.