fix jinja_loader annotation

This commit is contained in:
Cody Scott 2024-01-23 11:28:51 -05:00 committed by David Lord
parent 3207af8827
commit ecc057dd48
No known key found for this signature in database
GPG Key ID: 7A1C87E3F5BC42A8
2 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,8 @@ Version 3.0.2
Unreleased Unreleased
- Correct type for ``jinja_loader`` property. :issue:`5388`
Version 3.0.1 Version 3.0.1
------------- -------------

View File

@ -9,6 +9,7 @@ from collections import defaultdict
from functools import update_wrapper from functools import update_wrapper
import click import click
from jinja2 import BaseLoader
from jinja2 import FileSystemLoader from jinja2 import FileSystemLoader
from werkzeug.exceptions import default_exceptions from werkzeug.exceptions import default_exceptions
from werkzeug.exceptions import HTTPException from werkzeug.exceptions import HTTPException
@ -272,7 +273,7 @@ class Scaffold:
self._static_url_path = value self._static_url_path = value
@cached_property @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 """The Jinja loader for this object's templates. By default this
is a class :class:`jinja2.loaders.FileSystemLoader` to is a class :class:`jinja2.loaders.FileSystemLoader` to
:attr:`template_folder` if it is set. :attr:`template_folder` if it is set.