Skip to content

tests: skip mypy for packages without py.typed#15565

Merged
parthea merged 1 commit intomainfrom
skip-mypy
Feb 12, 2026
Merged

tests: skip mypy for packages without py.typed#15565
parthea merged 1 commit intomainfrom
skip-mypy

Conversation

@parthea
Copy link
Copy Markdown
Contributor

@parthea parthea commented Feb 12, 2026

See follow up issue #13362

@parthea parthea requested review from a team as code owners February 12, 2026 18:14
@gemini-code-assist
Copy link
Copy Markdown
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 integrates mypy type checking sessions into the Nox configurations across multiple Python packages. The sessions are currently set to be skipped for packages lacking a py.typed marker, acknowledging a known issue and ensuring that type checking can be progressively enabled without immediate failures. This change prepares the repositories for more robust type safety in the future.

Highlights

  • Mypy Session Introduction: A new mypy Nox session has been added to the noxfile.py for several packages, laying the groundwork for future type checking.
  • Conditional Mypy Skipping: The newly introduced mypy sessions are configured to be skipped for packages that do not yet include a py.typed marker, with a reference to issue Include mypy types / add py.typed #13362 for tracking the eventual enablement.
Changelog
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.

@parthea parthea enabled auto-merge (squash) February 12, 2026 18:16
@parthea parthea merged commit 9f6e8f5 into main Feb 12, 2026
27 checks passed
@parthea parthea deleted the skip-mypy branch February 12, 2026 18:18
Copy link
Copy Markdown
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 skips the mypy check for four packages that do not have a py.typed file, implemented consistently across the modified noxfile.py files as a temporary measure. No obvious security vulnerabilities such as injection or hardcoded secrets were identified. A minor improvement has been suggested for the TODO comment in each noxfile.py file to make it more specific about re-enabling mypy.

"""Run the type checker."""

# TODO(https://github.com/googleapis/google-cloud-python/issues/13362):
# Enable mypy once this bug is fixed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The comment 'Enable mypy once this bug is fixed' is a bit vague. It would be clearer to state what needs to be done to enable mypy for this package. Consider rephrasing to clarify that a py.typed file is needed.

Suggested change
# Enable mypy once this bug is fixed.
# Enable mypy once this package has a py.typed file.

"""Run the type checker."""

# TODO(https://github.com/googleapis/google-cloud-python/issues/13362):
# Enable mypy once this bug is fixed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The comment 'Enable mypy once this bug is fixed' is a bit vague. It would be clearer to state what needs to be done to enable mypy for this package. Consider rephrasing to clarify that a py.typed file is needed.

Suggested change
# Enable mypy once this bug is fixed.
# Enable mypy once this package has a py.typed file.

"""Run the type checker."""

# TODO(https://github.com/googleapis/google-cloud-python/issues/13362):
# Enable mypy once this bug is fixed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The comment 'Enable mypy once this bug is fixed' is a bit vague. It would be clearer to state what needs to be done to enable mypy for this package. Consider rephrasing to clarify that a py.typed file is needed.

Suggested change
# Enable mypy once this bug is fixed.
# Enable mypy once this package has a py.typed file.

"""Run the type checker."""

# TODO(https://github.com/googleapis/google-cloud-python/issues/13362):
# Enable mypy once this bug is fixed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The comment 'Enable mypy once this bug is fixed' is a bit vague. It would be clearer to state what needs to be done to enable mypy for this package. Consider rephrasing to clarify that a py.typed file is needed.

Suggested change
# Enable mypy once this bug is fixed.
# Enable mypy once this package has a py.typed file.

ohmayr pushed a commit that referenced this pull request Feb 19, 2026
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