Skip to content

Commit d1bfa57

Browse files
committed
Fix formatting
Had a few issues with formatting and the black version, this commit cleans that up.
1 parent 732b1e6 commit d1bfa57

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

async_asgi_testclient/exceptions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
(and in some cases, possible at all) to handle errors in different
55
ways.
66
"""
7-
from typing import Optional
8-
97
from async_asgi_testclient.utils import Message
8+
from typing import Optional
109

1110

1211
class TestClientError(Exception):

async_asgi_testclient/testing.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ async def send_lifespan(self, action):
111111
message = await receive(self._lifespan_output_queue, timeout=self.timeout)
112112

113113
if isinstance(message, Message):
114-
raise TestClientError(f"{message.event} - {message.reason} - {message.task}", message=message)
114+
raise TestClientError(
115+
f"{message.event} - {message.reason} - {message.task}", message=message
116+
)
115117

116118
if message["type"] == f"lifespan.{action}.complete":
117119
pass
@@ -272,7 +274,10 @@ async def open(
272274
message = await self.wait_response(receive_or_fail, "http.response.start")
273275
response.status_code = message["status"]
274276
response.headers = CIMultiDict(
275-
[(k.decode("utf8"), v.decode("utf8")) for k, v in message.get("headers", [])]
277+
[
278+
(k.decode("utf8"), v.decode("utf8"))
279+
for k, v in message.get("headers", [])
280+
]
276281
)
277282

278283
# Receive initial response body

async_asgi_testclient/websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def connect(self):
113113
headers.add("Cookie", cookie_jar.output(header=""))
114114

115115
scope = {
116-
"asgi": {"version": "3.0", },
116+
"asgi": {"version": "3.0",},
117117
"type": "websocket",
118118
"headers": flatten_headers(headers),
119119
"path": path,

0 commit comments

Comments
 (0)