Skip to content

Commit

Permalink
Fix formatting and linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lenard-mosys committed Oct 21, 2024
1 parent 4e3b283 commit a063ac0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_web_websocket_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,6 @@ async def test_abnormal_closure_when_client_does_not_close(
aiohttp_client: AiohttpClient,
) -> None:
"""Test abnormal closure when the server closes and the client doesn't respond."""

close_code: Optional[WSCloseCode] = None

async def handler(request: web.Request) -> web.WebSocketResponse:
Expand All @@ -1272,7 +1271,8 @@ async def handler(request: web.Request) -> web.WebSocketResponse:
await ws.close()

nonlocal close_code
close_code = WSCloseCode(ws.close_code)
if ws.close_code is not None:
close_code = WSCloseCode(ws.close_code)

return ws

Expand Down

0 comments on commit a063ac0

Please sign in to comment.