File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
1
from typing import Any
2
2
3
3
from django .http .request import HttpRequest
4
+ from django .template .base import Template
4
5
from django .template .exceptions import ( # noqa: F401
5
6
TemplateDoesNotExist as TemplateDoesNotExist ,
6
7
)
7
8
8
9
from . import engines as engines # noqa: F401
9
10
10
- def get_template (template_name : str , using : str | None = ...) -> Any : ...
11
+ def get_template (template_name : str , using : str | None = ...) -> Template : ...
11
12
def select_template (
12
13
template_name_list : list [str ] | str , using : str | None = ...
13
- ) -> Any : ...
14
+ ) -> Template : ...
14
15
def render_to_string (
15
16
template_name : list [str ] | str ,
16
17
context : dict [str , Any ] | None = ...,
Original file line number Diff line number Diff line change 1
- import collections
1
+ from collections .abc import Iterator
2
+ from pathlib import Path
2
3
from typing import Any
3
4
4
5
from django .core .exceptions import ImproperlyConfigured
@@ -7,10 +8,11 @@ from django.template.backends.base import BaseEngine
7
8
class InvalidTemplateEngineError (ImproperlyConfigured ): ...
8
9
9
10
class EngineHandler :
10
- templates : collections .OrderedDict [Any , Any ]
11
11
def __init__ (self , templates : list [dict [str , Any ]] = ...) -> None : ...
12
+ @property
13
+ def templates (self ) -> dict [str , dict [str , Any ]]: ...
12
14
def __getitem__ (self , alias : str ) -> BaseEngine : ...
13
- def __iter__ (self ) -> Any : ...
15
+ def __iter__ (self ) -> Iterator [ BaseEngine ] : ...
14
16
def all (self ) -> list [BaseEngine ]: ...
15
17
16
- def get_app_template_dirs (dirname : str ) -> tuple [Any , ...]: ...
18
+ def get_app_template_dirs (dirname : str ) -> tuple [Path , ...]: ...
You can’t perform that action at this time.
0 commit comments