From 8e8fc5cee5c78da8334495c6d6257d5612c40792 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 11 Jan 2021 13:34:38 -0800 Subject: [PATCH] Applied Black --- datasette/utils/asgi.py | 5 +---- tests/test_internals_request.py | 10 ++++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/datasette/utils/asgi.py b/datasette/utils/asgi.py index 7bfda201..63bf4926 100644 --- a/datasette/utils/asgi.py +++ b/datasette/utils/asgi.py @@ -92,10 +92,7 @@ class Request: @property def full_path(self): qs = self.query_string - return "{}{}".format( - self.path, - ('?' + qs) if qs else '' - ) + return "{}{}".format(self.path, ("?" + qs) if qs else "") @property def args(self): diff --git a/tests/test_internals_request.py b/tests/test_internals_request.py index dbfe07d7..fe273645 100644 --- a/tests/test_internals_request.py +++ b/tests/test_internals_request.py @@ -92,12 +92,10 @@ def test_request_url_vars(): ).url_vars - -@pytest.mark.parametrize("path,query_string,expected_full_path", [ - ("/", "", "/"), - ("/", "foo=bar", "/?foo=bar"), - ("/foo", "bar", "/foo?bar") -]) +@pytest.mark.parametrize( + "path,query_string,expected_full_path", + [("/", "", "/"), ("/", "foo=bar", "/?foo=bar"), ("/foo", "bar", "/foo?bar")], +) def test_request_properties(path, query_string, expected_full_path): scope = { "http_version": "1.1",