diff --git a/aiohttp_jinja2/__init__.py b/aiohttp_jinja2/__init__.py index 11214890..e1b68bf9 100644 --- a/aiohttp_jinja2/__init__.py +++ b/aiohttp_jinja2/__init__.py @@ -51,20 +51,17 @@ class _TemplateWrapper(Protocol): @overload def __call__( self, func: _SimpleTemplateHandler - ) -> Callable[[web.Request], Awaitable[web.StreamResponse]]: - ... + ) -> Callable[[web.Request], Awaitable[web.StreamResponse]]: ... @overload def __call__( self, func: Callable[[_AbstractView], _TemplateReturnType] - ) -> Callable[[_AbstractView], Awaitable[web.StreamResponse]]: - ... + ) -> Callable[[_AbstractView], Awaitable[web.StreamResponse]]: ... @overload def __call__( self, func: Callable[[_T, web.Request], _TemplateReturnType] - ) -> Callable[[_T, web.Request], Awaitable[web.StreamResponse]]: - ... + ) -> Callable[[_T, web.Request], Awaitable[web.StreamResponse]]: ... def setup( @@ -203,20 +200,17 @@ def template( @overload def wrapper( func: _SimpleTemplateHandler, - ) -> Callable[[web.Request], Awaitable[web.StreamResponse]]: - ... + ) -> Callable[[web.Request], Awaitable[web.StreamResponse]]: ... @overload def wrapper( func: Callable[[_AbstractView], _TemplateReturnType] - ) -> Callable[[_AbstractView], Awaitable[web.StreamResponse]]: - ... + ) -> Callable[[_AbstractView], Awaitable[web.StreamResponse]]: ... @overload def wrapper( func: Callable[[_T, web.Request], _TemplateReturnType] - ) -> Callable[[_T, web.Request], Awaitable[web.StreamResponse]]: - ... + ) -> Callable[[_T, web.Request], Awaitable[web.StreamResponse]]: ... def wrapper( func: Callable[..., _TemplateReturnType] diff --git a/aiohttp_jinja2/helpers.py b/aiohttp_jinja2/helpers.py index 756079cd..b9fcbaaa 100644 --- a/aiohttp_jinja2/helpers.py +++ b/aiohttp_jinja2/helpers.py @@ -2,6 +2,7 @@ useful context functions, see http://jinja.pocoo.org/docs/dev/api/#jinja2.contextfunction """ + import warnings from typing import Dict, Optional, TypedDict, Union