aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/hacks.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-03 22:46:16 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-03 22:46:16 -0700
commit62d3299471b7b4229ae63e21e9d45ef7efde4348 (patch)
treefc0d04531ce4c81224723bd3646c88f74c7c42a2 /fatcat_scholar/hacks.py
parent58688676ee2d96d9d7006e2fd8a14d47f271aa8f (diff)
downloadfatcat-scholar-62d3299471b7b4229ae63e21e9d45ef7efde4348.tar.gz
fatcat-scholar-62d3299471b7b4229ae63e21e9d45ef7efde4348.zip
reformat python code with black
Diffstat (limited to 'fatcat_scholar/hacks.py')
-rw-r--r--fatcat_scholar/hacks.py6
1 files changed, 4 insertions, 2 deletions
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"]