Skip to content

Commit f5bf69b

Browse files
ci(mypy): Bump version to 2.4.0 (#7937)
1 parent 02210fa commit f5bf69b

4 files changed

Lines changed: 103 additions & 103 deletions

File tree

‎sentry_sdk/integrations/openai_agents/patches/runner.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async def on_tool_start(
4949
context: "ToolContext[TContext]",
5050
agent: "Agent[TContext]",
5151
tool: "Tool",
52-
) -> "None":
52+
) -> None:
5353
if not isinstance(tool, FunctionTool):
5454
return
5555

@@ -75,7 +75,7 @@ async def on_tool_end(
7575
agent: "Agent[TContext]",
7676
tool: "Tool",
7777
result: "object",
78-
) -> "None":
78+
) -> None:
7979
if not isinstance(tool, FunctionTool):
8080
return
8181

@@ -104,7 +104,7 @@ def _patch_run_hooks(hooks: "RunHooks[TContext]") -> None:
104104
@wraps(original_on_tool_start)
105105
async def on_tool_start(
106106
context: "ToolContext[TContext]", agent: "Agent[TContext]", tool: "Tool"
107-
) -> "None":
107+
) -> None:
108108
with capture_internal_exceptions():
109109
await sentry_hooks.on_tool_start(context, agent, tool)
110110
await original_on_tool_start(context, agent, tool)
@@ -115,7 +115,7 @@ async def on_tool_end(
115115
agent: "Agent[TContext]",
116116
tool: "Tool",
117117
result: "object",
118-
) -> "None":
118+
) -> None:
119119
with capture_internal_exceptions():
120120
await sentry_hooks.on_tool_end(context, agent, tool, result)
121121
await original_on_tool_end(context, agent, tool, result)

‎sentry_sdk/integrations/socket.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
if MYPY:
1010
from socket import AddressFamily, SocketKind
11-
from typing import List, Optional, Tuple, Union
11+
from typing import List, Literal, Optional, Tuple, Union
1212

1313
__all__ = ["SocketIntegration"]
1414

@@ -101,7 +101,7 @@ def getaddrinfo(
101101
type: int = 0,
102102
proto: int = 0,
103103
flags: int = 0,
104-
) -> "List[Tuple[AddressFamily, SocketKind, int, str, Union[Tuple[str, int], Tuple[str, int, int, int], Tuple[int, bytes]]]]":
104+
) -> "List[Tuple[Literal[AddressFamily.AF_INET], SocketKind, int, str, Tuple[str, int]] | Tuple[Literal[AddressFamily.AF_INET6], SocketKind, int, str, Union[Tuple[str, int, int, int], Tuple[int, bytes]]]]":
105105
client = sentry_sdk.get_client()
106106
integration = client.get_integration(SocketIntegration)
107107
if integration is None:

‎sentry_sdk/spotlight.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def process_response(
205205
def process_exception(
206206
self: "Self", _request: "HttpRequest", exception: Exception
207207
) -> "Optional[HttpResponseServerError]":
208-
if not settings.DEBUG or not self._spotlight_url:
208+
if settings is None or not settings.DEBUG or not self._spotlight_url:
209209
return None
210210

211211
try:

0 commit comments

Comments
 (0)