From 62d3299471b7b4229ae63e21e9d45ef7efde4348 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 3 Jun 2020 22:46:16 -0700 Subject: reformat python code with black --- fatcat_scholar/hacks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fatcat_scholar/hacks.py') diff --git a/fatcat_scholar/hacks.py b/fatcat_scholar/hacks.py index fc1dacd..710a25f 100644 --- a/fatcat_scholar/hacks.py +++ b/fatcat_scholar/hacks.py @@ -1,10 +1,10 @@ - import typing import jinja2 from starlette.background import BackgroundTask from starlette.templating import _TemplateResponse + class Jinja2Templates: """ This is a patched version of starlette.templating.Jinja2Templates that @@ -15,7 +15,9 @@ class Jinja2Templates: assert jinja2 is not None, "jinja2 must be installed to use Jinja2Templates" self.env = self.get_env(directory, extensions) - def get_env(self, directory: str, extensions: typing.List[str] = []) -> "jinja2.Environment": + def get_env( + self, directory: str, extensions: typing.List[str] = [] + ) -> "jinja2.Environment": @jinja2.contextfunction def url_for(context: dict, name: str, **path_params: typing.Any) -> str: request = context["request"] -- cgit v1.2.3