Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jinja_loader typehint #5389

Merged
merged 1 commit into from Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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