From 2349ef79422254b0460924acd73f11436fa44f7b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:26:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aiohttp_jinja2/__init__.py | 18 ++++++------------ aiohttp_jinja2/helpers.py | 1 + 2 files changed, 7 insertions(+), 12 deletions(-) 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