Skip to content

Commit 98d9929

Browse files
mypy
1 parent 3f13802 commit 98d9929

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sentry_sdk/integrations/mcp.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
try:
2222
from mcp.server.lowlevel import Server # type: ignore[import-not-found]
2323
from mcp.server.lowlevel.server import request_ctx # type: ignore[import-not-found]
24-
from mcp.server.streamable_http import StreamableHTTPServerTransport
24+
from mcp.server.streamable_http import StreamableHTTPServerTransport # type: ignore[import-not-found]
2525
except ImportError:
2626
raise DidNotEnable("MCP SDK not installed")
2727

@@ -32,7 +32,7 @@
3232

3333

3434
if TYPE_CHECKING:
35-
from typing import Any, Callable, Optional
35+
from typing import Any, Callable, Optional, Tuple
3636

3737
from starlette.types import Receive, Scope, Send
3838

@@ -63,7 +63,9 @@ def setup_once() -> None:
6363
_patch_fastmcp()
6464

6565

66-
def _get_active_http_scopes():
66+
def _get_active_http_scopes() -> (
67+
"Optional[Tuple[Optional[sentry_sdk.tracing.Scope], Optional[sentry_sdk.tracing.Scope]]]"
68+
):
6769
try:
6870
ctx = request_ctx.get()
6971
except LookupError:

0 commit comments

Comments
 (0)