We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c4e443 commit ba53213Copy full SHA for ba53213
sentry_sdk/integrations/pydantic_ai/__init__.py
@@ -21,6 +21,7 @@
21
from typing import TYPE_CHECKING
22
23
if TYPE_CHECKING:
24
+ from typing import Any
25
from pydantic_ai import ModelRequestContext, RunContext
26
from pydantic_ai.messages import ModelResponse # type: ignore
27
@@ -108,7 +109,9 @@ async def on_response(
108
109
original_init = Agent.__init__
110
111
@functools.wraps(original_init)
- def patched_init(self, *args, **kwargs) -> None:
112
+ def patched_init(
113
+ self: "Agent[Any, Any]", *args: "Any", **kwargs: "Any"
114
+ ) -> None:
115
caps = list(kwargs.get("capabilities") or [])
116
caps.append(hooks)
117
kwargs["capabilities"] = caps
0 commit comments