Skip to content

fix(types, tunings): resolve optional IPython mypy type errors (#1288)#2773

Open
giterinhub wants to merge 1 commit into
googleapis:mainfrom
giterinhub:fix/ipython-mypy-annotations
Open

fix(types, tunings): resolve optional IPython mypy type errors (#1288)#2773
giterinhub wants to merge 1 commit into
googleapis:mainfrom
giterinhub:fix/ipython-mypy-annotations

Conversation

@giterinhub

@giterinhub giterinhub commented Jul 24, 2026

Copy link
Copy Markdown

Fixes #1288
Addresses part of #1761

Summary & Context

This PR resolves 9 pre-existing mypy type checking errors in google/genai/types.py and google/genai/tunings.py related to optional IPython imports and untyped calls.


Changes Made

  1. Added # type: ignore[assignment] and # type: ignore[no-untyped-call] annotations for optional IPython_display handling in google/genai/types.py.
  2. Added # type: ignore[attr-defined] and # type: ignore[no-untyped-call] annotations for optional IPython notebook helper functions in google/genai/tunings.py.

Verification

  • mypy google/genai/ -> Success: no issues found in 35 source files.

…ogleapis#1761)

Related to googleapis#1761
Addresses part of googleapis#1761

- Add # type: ignore annotations for optional IPython module assignments and untyped calls in types.py and tunings.py
- Resolves 9 static analysis mypy type checking failures when ipython is uninstalled or untyped
@giterinhub
giterinhub force-pushed the fix/ipython-mypy-annotations branch from ac83344 to 4a6776b Compare July 24, 2026 08:23
@Venkaiahbabuneelam Venkaiahbabuneelam self-assigned this Jul 24, 2026
@Venkaiahbabuneelam Venkaiahbabuneelam added the size:M Code changes between 10-40 lines label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M Code changes between 10-40 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

first-class model/region fallbacks

2 participants