fix: consolidate WS proxy Bearer header guard to single line for CI test

The source-inspection test checks each line individually for an 'if'
guard. The multi-line formatting of the 'if remote_key else {}' guard
split it across 3 lines, making the test see an unguarded header.
Consolidated to match the single-line pattern of the other 4 endpoints.
This commit is contained in:
Brian Krabach
2026-04-07 08:10:14 -07:00
parent d2691b9205
commit 12ad92986e
+1 -3
View File
@@ -785,9 +785,7 @@ async def federation_terminal_ws_proxy(websocket: WebSocket, remote_id: int) ->
async with websockets.connect(
ws_url,
subprotocols=[Subprotocol("tty")],
additional_headers={"Authorization": f"Bearer {remote_key}"}
if remote_key
else {},
additional_headers={"Authorization": f"Bearer {remote_key}"} if remote_key else {},
ssl=ssl_context,
) as remote_ws: