Skip to content

ci: Add google-genai to uv typing group - #7323

Merged
alexander-alderman-webb merged 4 commits into
masterfrom
webb/google-genai/mypy
Sep 1, 2026
Merged

ci: Add google-genai to uv typing group#7323
alexander-alderman-webb merged 4 commits into
masterfrom
webb/google-genai/mypy

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

Add google-genai to the typing dependency group and fix the resulting mypy errors.

Resolve:

warning: No `requires-python` value found in the workspace. Defaulting to `>=3.14`.
sentry_sdk/integrations/google_genai/utils.py:608: error: Item "None" of "list[Candidate] | None" has no attribute "__iter__" (not iterable)  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:614: error: Item "None" of "Content | Any | None" has no attribute "parts"  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:614: error: Item "None" of "list[Part] | Any | None" has no attribute "__iter__" (not iterable)  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:624: error: Item "None" of "FunctionCall | Any | None" has no attribute "args"  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:631: error: Item "None" of "list[Content] | None" has no attribute "__iter__" (not iterable)  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:661: error: Argument 1 to "signature" has incompatible type "Tool"; expected "Callable[..., Any]"  [arg-type]
sentry_sdk/integrations/google_genai/utils.py:722: error: Argument 3 to "_capture_tool_input" has incompatible type "Callable[..., Any]"; expected "Tool"  [arg-type]
sentry_sdk/integrations/google_genai/utils.py:750: error: Argument 3 to "_capture_tool_input" has incompatible type "Callable[..., Any]"; expected "Tool"  [arg-type]
sentry_sdk/integrations/google_genai/utils.py:779: error: Argument 1 to "wrapped_tool" has incompatible type "google.genai.types.Tool | Callable[..., Any] | mcp_types._types.Tool | ClientSession | Any"; expected "google.genai.types.Tool | Callable[..., Any]"  [arg-type]
sentry_sdk/integrations/google_genai/utils.py:779: error: Item "None" of "list[google.genai.types.Tool | Callable[..., Any] | mcp_types._types.Tool | ClientSession] | None" has no attribute "__iter__" (not iterable)  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:793: error: Item "None" of "list[Candidate] | None" has no attribute "__iter__" (not iterable)  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:804: error: Incompatible return value type (got "list[str | Any | None] | None", expected "list[str] | None")  [return-value]
sentry_sdk/integrations/google_genai/utils.py:815: error: Item "None" of "list[Candidate] | None" has no attribute "__iter__" (not iterable)  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:847: error: Incompatible types (expression has type "Any | str | None", TypedDict item "content" has type "str")  [typeddict-item]
sentry_sdk/integrations/google_genai/utils.py:847: error: TypedDict "ContentDict" has no key "text"  [typeddict-item]
sentry_sdk/integrations/google_genai/utils.py:847: error: TypedDict "FileDict" has no key "text"  [typeddict-item]
sentry_sdk/integrations/google_genai/utils.py:851: error: Item "object" of "Any | object" has no attribute "__iter__" (not iterable)  [union-attr]
sentry_sdk/integrations/google_genai/utils.py:907: error: Argument 1 to "_format_tools_for_span" has incompatible type "list[google.genai.types.Tool | Callable[..., Any] | mcp_types._types.Tool | ClientSession]"; expected "Iterable[google.genai.types.Tool | Callable[..., Any]]"  [arg-type]
sentry_sdk/integrations/google_genai/utils.py:1006: error: Argument 2 to "set_attribute" of "StreamedSpan" has incompatible type "str | None"; expected "str | bool | float | int | list[str] | <7 more items>"  [arg-type]
sentry_sdk/integrations/google_genai/utils.py:1009: error: Argument 2 to "set_attribute" of "StreamedSpan" has incompatible type "str | None"; expected "str | bool | float | int | list[str] | <7 more items>"  [arg-type]
sentry_sdk/integrations/google_genai/utils.py:1069: error: Argument 1 to "wrapped_config_with_tools" has incompatible type "Any | None"; expected "GenerateContentConfig"  [arg-type]
sentry_sdk/integrations/google_genai/__init__.py:50: error: Cannot assign to a method  [method-assign]
sentry_sdk/integrations/google_genai/__init__.py:51: error: Cannot assign to a method  [method-assign]
sentry_sdk/integrations/google_genai/__init__.py:54: error: Cannot assign to a method  [method-assign]
sentry_sdk/integrations/google_genai/__init__.py:57: error: Cannot assign to a method  [method-assign]
sentry_sdk/integrations/google_genai/__init__.py:60: error: Cannot assign to a method  [method-assign]
sentry_sdk/integrations/google_genai/__init__.py:63: error: Cannot assign to a method  [method-assign]
Found 27 errors in 2 files (checked 193 source files)

Issues

Reminders

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review September 1, 2026 09:04
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner September 1, 2026 09:04

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0dd0a68. Configure here.

Comment thread sentry_sdk/integrations/google_genai/utils.py Outdated
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

121930 passed | ⏭️ 6762 skipped | Total: 128692 | Pass Rate: 94.75% | Execution Time: 436m 57s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

❌ Patch coverage is 70.69%. Project has 2489 uncovered lines.
✅ Project coverage is 90.29%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/google_genai/utils.py 67.31% ⚠️ 17 Missing and 11 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.28%    90.29%    +0.01%
==========================================
  Files          193       193         —
  Lines        25621     25646       +25
  Branches      9438      9454       +16
==========================================
+ Hits         23132     23157       +25
- Misses        2489      2489         —
- Partials      1436      1445        +9

Generated by Codecov Action

@alexander-alderman-webb
alexander-alderman-webb merged commit 12644a6 into master Sep 1, 2026
144 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/google-genai/mypy branch September 1, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants