Skip to content

Commit ecc057d

Browse files
Siecjedavidism
authored andcommitted
fix jinja_loader annotation
1 parent 3207af8 commit ecc057d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.rst

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Version 3.0.2
33

44
Unreleased
55

6+
- Correct type for ``jinja_loader`` property. :issue:`5388`
7+
68

79
Version 3.0.1
810
-------------

src/flask/sansio/scaffold.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from functools import update_wrapper
1010

1111
import click
12+
from jinja2 import BaseLoader
1213
from jinja2 import FileSystemLoader
1314
from werkzeug.exceptions import default_exceptions
1415
from werkzeug.exceptions import HTTPException
@@ -272,7 +273,7 @@ def static_url_path(self, value: str | None) -> None:
272273
self._static_url_path = value
273274

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

0 commit comments

Comments
 (0)