Skip to content

Commit dde065b

Browse files
authored
use type instead of pyright (open-telemetry#3392)
Signed-off-by: emdneto <[email protected]>
1 parent 8b2558f commit dde065b

File tree

2 files changed

+4
-4
lines changed
  • instrumentation-genai
    • opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai
    • opentelemetry-instrumentation-vertexai/src/opentelemetry/instrumentation/vertexai

2 files changed

+4
-4
lines changed

instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ async def instrumented_generate_content(
619619

620620

621621
# Disabling type checking because this is not yet implemented and tested fully.
622-
def _create_instrumented_async_generate_content_stream( # pyright: ignore
622+
def _create_instrumented_async_generate_content_stream( # type: ignore
623623
snapshot: _MethodsSnapshot, otel_wrapper: OTelWrapper
624624
):
625625
wrapped_func = snapshot.async_generate_content_stream
@@ -632,7 +632,7 @@ async def instrumented_generate_content_stream(
632632
contents: Union[ContentListUnion, ContentListUnionDict],
633633
config: Optional[GenerateContentConfigOrDict] = None,
634634
**kwargs: Any,
635-
) -> Awaitable[AsyncIterator[GenerateContentResponse]]: # pyright: ignore
635+
) -> Awaitable[AsyncIterator[GenerateContentResponse]]: # type: ignore
636636
helper = _GenerateContentInstrumentationHelper(
637637
self, otel_wrapper, model
638638
)

instrumentation-genai/opentelemetry-instrumentation-vertexai/src/opentelemetry/instrumentation/vertexai/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _methods_to_wrap(
7979
):
8080
yield (
8181
client_class,
82-
client_class.generate_content.__name__, # pyright: ignore[reportUnknownMemberType]
82+
client_class.generate_content.__name__, # type: ignore[reportUnknownMemberType]
8383
method_wrappers.generate_content,
8484
)
8585

@@ -89,7 +89,7 @@ def _methods_to_wrap(
8989
):
9090
yield (
9191
client_class,
92-
client_class.generate_content.__name__, # pyright: ignore[reportUnknownMemberType]
92+
client_class.generate_content.__name__, # type: ignore[reportUnknownMemberType]
9393
method_wrappers.agenerate_content,
9494
)
9595

0 commit comments

Comments
 (0)