diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-05-20 09:01:58 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-05-20 09:13:14 +0300 |
commit | 113478c6a7e201ab2d7ad78d9edbc28800283a75 (patch) | |
tree | 98b88d8dc4bfe5c664f813ead96eefb0f456e2a9 /contrib/python/Jinja2/py3/jinja2/runtime.py | |
parent | 685fde8e2a4228200a88a5987a061329f7c59323 (diff) | |
download | ydb-113478c6a7e201ab2d7ad78d9edbc28800283a75.tar.gz |
Update contrib/python/Jinja2/py3 to 3.1.4
264ae85f13f4a11226be8b846079da1aece08b50
Diffstat (limited to 'contrib/python/Jinja2/py3/jinja2/runtime.py')
-rw-r--r-- | contrib/python/Jinja2/py3/jinja2/runtime.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/python/Jinja2/py3/jinja2/runtime.py b/contrib/python/Jinja2/py3/jinja2/runtime.py index 58a540ba3f4..4325c8deb22 100644 --- a/contrib/python/Jinja2/py3/jinja2/runtime.py +++ b/contrib/python/Jinja2/py3/jinja2/runtime.py @@ -1,4 +1,5 @@ """The runtime functions and state used by compiled templates.""" + import functools import sys import typing as t @@ -28,7 +29,9 @@ F = t.TypeVar("F", bound=t.Callable[..., t.Any]) if t.TYPE_CHECKING: import logging + import typing_extensions as te + from .environment import Environment class LoopRenderFunc(te.Protocol): @@ -37,8 +40,7 @@ if t.TYPE_CHECKING: reciter: t.Iterable[V], loop_render_func: "LoopRenderFunc", depth: int = 0, - ) -> str: - ... + ) -> str: ... # these variables are exported to the template runtime @@ -259,7 +261,10 @@ class Context: @internalcode def call( - __self, __obj: t.Callable, *args: t.Any, **kwargs: t.Any # noqa: B902 + __self, + __obj: t.Callable[..., t.Any], + *args: t.Any, + **kwargs: t.Any, # noqa: B902 ) -> t.Union[t.Any, "Undefined"]: """Call the callable with the arguments and keyword arguments provided but inject the active context or environment as first @@ -586,7 +591,7 @@ class AsyncLoopContext(LoopContext): @staticmethod def _to_iterator( # type: ignore - iterable: t.Union[t.Iterable[V], t.AsyncIterable[V]] + iterable: t.Union[t.Iterable[V], t.AsyncIterable[V]], ) -> t.AsyncIterator[V]: return auto_aiter(iterable) |