fix type hints
This commit is contained in:
@@ -48,7 +48,6 @@ class MCPSessionMiddleware(BaseHTTPMiddleware):
|
|||||||
auth_context = None
|
auth_context = None
|
||||||
user_email = None
|
user_email = None
|
||||||
mcp_session_id = None
|
mcp_session_id = None
|
||||||
|
|
||||||
# Check for FastMCP auth context
|
# Check for FastMCP auth context
|
||||||
if hasattr(request.state, "auth"):
|
if hasattr(request.state, "auth"):
|
||||||
auth_context = request.state.auth
|
auth_context = request.state.auth
|
||||||
@@ -110,4 +109,4 @@ class MCPSessionMiddleware(BaseHTTPMiddleware):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error in MCP session middleware: {e}")
|
logger.error(f"Error in MCP session middleware: {e}")
|
||||||
# Continue without session context
|
# Continue without session context
|
||||||
return await call_next(request)
|
return await call_next(request)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import logging
|
|||||||
import asyncio
|
import asyncio
|
||||||
import base64
|
import base64
|
||||||
import ssl
|
import ssl
|
||||||
from typing import Optional, List, Dict, Literal
|
from typing import Optional, List, Dict, Literal, Any
|
||||||
|
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ def _format_body_content(text_body: str, html_body: str) -> str:
|
|||||||
return "[No readable content found]"
|
return "[No readable content found]"
|
||||||
|
|
||||||
|
|
||||||
def _extract_attachments(payload: dict) -> List[Dict[str, any]]:
|
def _extract_attachments(payload: dict) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Extract attachment metadata from a Gmail message payload.
|
Extract attachment metadata from a Gmail message payload.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user