chore(spanner): centralize mypy config for spanner#17641
Open
chalmerlowe wants to merge 9 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request centralizes the mypy configuration by removing the package-specific configuration file in packages/google-cloud-spanner and updating its noxfile.py to reference the root mypy.ini. The root configuration is also updated with various package-specific overrides. However, the override to ignore missing imports for google.iam.* from the deleted configuration was not migrated to the root mypy.ini, which will cause mypy checks to fail for the spanner package.
chalmerlowe
added a commit
that referenced
this pull request
Jul 8, 2026
* Relies on a centralized `mypy.ini` file at the root of the repository
to consolidate all shared and package-specific mypy exceptions.
* Deletes the individual `mypy.ini` files from handwritten libraries,
establishing the root configuration as the source of truth.
* Refactored their `noxfile.py` files to define `MYPY_CONFIG_FILE`
dynamically and standardized their `session.run("mypy", ...)`
invocations.
Related to: PR #17409 and PR #17641
> [!note]
> all three PRs rely on the same centralized mypy.ini config. So you may
see some minor edits in the main config that are applicable to packages
in one of the other PRs. This will have no effect on those packages
until their noxfiles are updated to begin using the new centralized
config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mypy.inifile at the root of the repository to consolidate all shared and package-specific mypy exceptions.mypy.inifiles from handwritten libraries, establishing the root configuration as the source of truth.noxfile.pyfiles to defineMYPY_CONFIG_FILEdynamically and standardized theirsession.run("mypy", ...)invocations.Related to: PR #17409 and PR #17640
Note
all three PRs rely on the same centralized mypy.ini config. So you may see some minor edits in the main config that are applicable to packages in one of the other PRs. This will have no effect on those packages until their noxfiles are updated to begin using the new centralized config.
Note
There are minor updates to
_helpers.pyandconftest.pydue to a linting issue, that's it.