From d7364116991d85612c88ed0f800f1c36d83ba57b Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 16 Jun 2019 08:43:58 -0700 Subject: [PATCH] Applied black --- datasette/views/base.py | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/datasette/views/base.py b/datasette/views/base.py index 69c0ba16..b278f3fb 100644 --- a/datasette/views/base.py +++ b/datasette/views/base.py @@ -78,24 +78,18 @@ class AsgiRouter: async def hello_world(scope, receive, send): - assert scope['type'] == 'http' - await send({ - 'type': 'http.response.start', - 'status': 200, - 'headers': [ - [b'content-type', b'text/html'], - ] - }) - await send({ - 'type': 'http.response.body', - 'body': b'

Hello world!

', - }) + assert scope["type"] == "http" + await send( + { + "type": "http.response.start", + "status": 200, + "headers": [[b"content-type", b"text/html"]], + } + ) + await send({"type": "http.response.body", "body": b"

Hello world!

"}) - -app = AsgiRouter([ - ('/hello/', hello_world), -]) +app = AsgiRouter([("/hello/", hello_world)]) class AsgiView(HTTPMethodView):