Skip to content

Commit

Permalink
fix jinja_loader annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje authored and davidism committed Feb 3, 2024
1 parent 3207af8 commit ecc057d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 ecc057d

Please sign in to comment.