Skip to content

Commit 80b86e2

Browse files
committed
fix lint
1 parent a0963e5 commit 80b86e2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

instrumentation-genai/opentelemetry-instrumentation-anthropic/src/opentelemetry/instrumentation/anthropic/messages_extractors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
)
3030
from opentelemetry.util.genai.types import (
3131
InputMessage,
32-
LLMInvocation,
32+
LLMInvocation, # pyright: ignore[reportDeprecated]
3333
MessagePart,
3434
OutputMessage,
3535
)
@@ -155,7 +155,7 @@ def get_output_messages_from_message(
155155

156156

157157
def set_invocation_response_attributes(
158-
invocation: LLMInvocation,
158+
invocation: LLMInvocation, # pyright: ignore[reportDeprecated]
159159
message: Message | None,
160160
capture_content: bool,
161161
) -> None:

instrumentation-genai/opentelemetry-instrumentation-anthropic/src/opentelemetry/instrumentation/anthropic/wrappers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969

7070
def _set_response_attributes(
71-
invocation: LLMInvocation,
71+
invocation: LLMInvocation, # pyright: ignore[reportDeprecated]
7272
result: "Message | None",
7373
capture_content: bool,
7474
) -> None:
@@ -203,14 +203,14 @@ def _stop(self) -> None:
203203
self.invocation, self._message, self._capture_content
204204
)
205205
with self._safe_instrumentation("stop_llm"):
206-
self.handler.stop_llm(self.invocation)
206+
self.handler.stop_llm(self.invocation) # pyright: ignore[reportDeprecated]
207207
self._finalized = True
208208

209209
def _fail(self, message: str, error_type: type[BaseException]) -> None:
210210
if self._finalized:
211211
return
212212
with self._safe_instrumentation("fail_llm"):
213-
self.handler.fail_llm(
213+
self.handler.fail_llm( # pyright: ignore[reportDeprecated]
214214
self.invocation, Error(message=message, type=error_type)
215215
)
216216
self._finalized = True
@@ -258,7 +258,7 @@ def __init__(
258258
self,
259259
stream: "AsyncStream[RawMessageStreamEvent] | AsyncMessageStream[ResponseFormatT]",
260260
handler: TelemetryHandler,
261-
invocation: LLMInvocation,
261+
invocation: LLMInvocation, # pyright: ignore[reportDeprecated]
262262
capture_content: bool,
263263
):
264264
self.stream = stream
@@ -324,7 +324,7 @@ def __init__(
324324
self,
325325
manager: "MessageStreamManager[ResponseFormatT]",
326326
handler: TelemetryHandler,
327-
invocation: LLMInvocation,
327+
invocation: LLMInvocation, # pyright: ignore[reportDeprecated]
328328
capture_content: bool,
329329
):
330330
self._manager = manager
@@ -382,7 +382,7 @@ def __init__(
382382
self,
383383
manager: "AsyncMessageStreamManager[ResponseFormatT]",
384384
handler: TelemetryHandler,
385-
invocation: LLMInvocation,
385+
invocation: LLMInvocation, # pyright: ignore[reportDeprecated]
386386
capture_content: bool,
387387
):
388388
self._manager = manager

0 commit comments

Comments
 (0)