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):