Skip to content

Commit ba53213

Browse files
add annotations
1 parent 0c4e443 commit ba53213

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sentry_sdk/integrations/pydantic_ai/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from typing import TYPE_CHECKING
2222

2323
if TYPE_CHECKING:
24+
from typing import Any
2425
from pydantic_ai import ModelRequestContext, RunContext
2526
from pydantic_ai.messages import ModelResponse # type: ignore
2627

@@ -108,7 +109,9 @@ async def on_response(
108109
original_init = Agent.__init__
109110

110111
@functools.wraps(original_init)
111-
def patched_init(self, *args, **kwargs) -> None:
112+
def patched_init(
113+
self: "Agent[Any, Any]", *args: "Any", **kwargs: "Any"
114+
) -> None:
112115
caps = list(kwargs.get("capabilities") or [])
113116
caps.append(hooks)
114117
kwargs["capabilities"] = caps

0 commit comments

Comments
 (0)