Skip to content

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Jan 23, 2026

Towards #15104

This is needed to unblock #15457 which has the following mypy failure for google-cloud-automl

nox > mypy -p google
.nox/mypy-3-14/lib/python3.14/site-packages/google/cloud/automl_v1beta1/services/tables/gcs_client.py:25: error: Library stubs not installed for "pandas"  [import-untyped]
.nox/mypy-3-14/lib/python3.14/site-packages/google/cloud/automl_v1beta1/services/tables/gcs_client.py:25: note: Hint: "python3 -m pip install pandas-stubs"
.nox/mypy-3-14/lib/python3.14/site-packages/google/cloud/automl_v1beta1/services/tables/gcs_client.py:25: note: (or run "mypy --install-types" to install all missing stub packages)
.nox/mypy-3-14/lib/python3.14/site-packages/google/cloud/automl_v1beta1/services/tables/gcs_client.py:25: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
.nox/mypy-3-14/lib/python3.14/site-packages/google/cloud/automl_v1beta1/services/tables/gcs_client.py:30: error: Module "google.cloud" has no attribute "storage"  [attr-defined]

See follow up bug forgoogle-cloud-storage : googleapis/python-storage#318
See follow up bug for pre-release failure: googleapis/proto-plus-python#558
See follow up bug to add --strict flag for mypy: googleapis/gapic-generator-python#2089

@parthea parthea requested review from a team as code owners January 23, 2026 20:38
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @parthea, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses and resolves mypy type-checking failures within the google-cloud-automl package. By incorporating pandas-stubs and strategically adding type: ignore directives for specific imports, it ensures that the package now passes static analysis, unblocking dependent development efforts and improving code quality.

Highlights

  • Mypy Error Resolution: Addressed and resolved mypy type-checking errors within the google-cloud-automl package.
  • Dependency Update: Included pandas-stubs in the mypy session dependencies for google-cloud-automl to provide type information for the pandas library.
  • Type Ignore Directives: Introduced type: ignore comments for pandas and google.cloud.storage imports in gcs_client.py to temporarily suppress specific mypy errors, with a TODO for the google.cloud.storage issue.
  • Code Generation Configuration: Updated the .librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml to ensure pandas-stubs is consistently included in generated noxfile.py files for google-cloud-automl.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses mypy errors by adding pandas-stubs to the test dependencies and using type: ignore to suppress errors related to optional dependencies and a known issue in python-storage. The changes are correct and effectively resolve the type checking failures. I've provided a few suggestions to make the type: ignore comments more specific by including the mypy error codes. This is a best practice that improves maintainability by ensuring that only specific errors are suppressed.

parthea and others added 2 commits January 23, 2026 15:40
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@parthea parthea merged commit 78eb0a1 into main Jan 23, 2026
25 of 26 checks passed
@parthea parthea deleted the fix-mypy-google-cloud-automl branch January 23, 2026 21:34
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