style: auto-fix ruff lint and format
This commit is contained in:
@@ -96,9 +96,7 @@ class SecureFastMCP(FastMCP):
|
||||
|
||||
# Rebuild middleware stack
|
||||
app.middleware_stack = app.build_middleware_stack()
|
||||
logger.info(
|
||||
"Added middleware stack: WellKnownCacheControl, Session Management"
|
||||
)
|
||||
logger.info("Added middleware stack: WellKnownCacheControl, Session Management")
|
||||
return app
|
||||
|
||||
|
||||
|
||||
@@ -184,7 +184,9 @@ def _format_body_content(text_body: str, html_body: str) -> str:
|
||||
)
|
||||
|
||||
# Prefer plain text, but fall back to HTML when plain text is empty or clearly low-value.
|
||||
use_html = html_text and (not text_stripped or "<!--" in text_stripped or plain_is_low_value)
|
||||
use_html = html_text and (
|
||||
not text_stripped or "<!--" in text_stripped or plain_is_low_value
|
||||
)
|
||||
|
||||
if use_html:
|
||||
content = html_text
|
||||
|
||||
@@ -51,7 +51,9 @@ def test_well_known_cache_control_middleware_rewrites_headers():
|
||||
assert "etag" not in extra.headers
|
||||
|
||||
|
||||
def test_configured_server_applies_no_cache_to_served_oauth_discovery_routes(monkeypatch):
|
||||
def test_configured_server_applies_no_cache_to_served_oauth_discovery_routes(
|
||||
monkeypatch,
|
||||
):
|
||||
monkeypatch.setenv("MCP_ENABLE_OAUTH21", "true")
|
||||
monkeypatch.setenv("GOOGLE_OAUTH_CLIENT_ID", "dummy-client")
|
||||
monkeypatch.setenv("GOOGLE_OAUTH_CLIENT_SECRET", "dummy-secret")
|
||||
|
||||
Reference in New Issue
Block a user