Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

style(tests): apply ruff format to compression diagnostics test

SwiftWing217f03e5a1c2c7
diff --git a/tests/test_proxy_anthropic_compression_diagnostics.py b/tests/test_proxy_anthropic_compression_diagnostics.py
index 99441bf86..d102ad74f 100644
--- a/tests/test_proxy_anthropic_compression_diagnostics.py
+++ b/tests/test_proxy_anthropic_compression_diagnostics.py
@@ -142,12 +142,12 @@ def test_optimization_failure_logs_exception_type() -> None:
assert response.status_code == 200, response.text
warning_msgs = [
- call.args[0] for call in mock_warning.call_args_list
+ call.args[0]
+ for call in mock_warning.call_args_list
if call.args and "Optimization failed" in str(call.args[0])
]
assert warning_msgs, (
- f"expected an 'Optimization failed' warning, got calls: "
- f"{mock_warning.call_args_list!r}"
+ f"expected an 'Optimization failed' warning, got calls: {mock_warning.call_args_list!r}"
)
msg = warning_msgs[0]
assert "TimeoutError" in msg, f"expected exception type in warning, got: {msg!r}"