Skip to content

use type instead of pyright #3392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ async def instrumented_generate_content(


# Disabling type checking because this is not yet implemented and tested fully.
def _create_instrumented_async_generate_content_stream( # pyright: ignore
def _create_instrumented_async_generate_content_stream( # type: ignore
snapshot: _MethodsSnapshot, otel_wrapper: OTelWrapper
):
wrapped_func = snapshot.async_generate_content_stream
Expand All @@ -632,7 +632,7 @@ async def instrumented_generate_content_stream(
contents: Union[ContentListUnion, ContentListUnionDict],
config: Optional[GenerateContentConfigOrDict] = None,
**kwargs: Any,
) -> Awaitable[AsyncIterator[GenerateContentResponse]]: # pyright: ignore
) -> Awaitable[AsyncIterator[GenerateContentResponse]]: # type: ignore
helper = _GenerateContentInstrumentationHelper(
self, otel_wrapper, model
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _methods_to_wrap(
):
yield (
client_class,
client_class.generate_content.__name__, # pyright: ignore[reportUnknownMemberType]
client_class.generate_content.__name__, # type: ignore[reportUnknownMemberType]
method_wrappers.generate_content,
)

Expand All @@ -89,7 +89,7 @@ def _methods_to_wrap(
):
yield (
client_class,
client_class.generate_content.__name__, # pyright: ignore[reportUnknownMemberType]
client_class.generate_content.__name__, # type: ignore[reportUnknownMemberType]
method_wrappers.agenerate_content,
)

Expand Down
Loading