Skip to content

Revert "chore(generator): centralize mypy configuration and regenerate google-cloud-datastore POC"#17493

Merged
zhumin8 merged 1 commit into
mainfrom
revert-17408-feat/centralize-mypy
Jun 17, 2026
Merged

Revert "chore(generator): centralize mypy configuration and regenerate google-cloud-datastore POC"#17493
zhumin8 merged 1 commit into
mainfrom
revert-17408-feat/centralize-mypy

Conversation

@zhumin8

@zhumin8 zhumin8 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Reverts #17408

@zhumin8 zhumin8 requested a review from a team as a code owner June 17, 2026 16:44

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

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.

Code Review

This pull request transitions from a centralized mypy configuration to package-specific mypy.ini files across generator templates and golden packages. It also lowers the minimum version requirements for several dependencies in google-cloud-datastore (such as google-api-core, proto-plus, and protobuf) and updates the corresponding version checks and constraints. Feedback on the changes includes a correction to a regular expression in setup.py where unescaped dots are acting as wildcards instead of matching literal dots.

r"(?<=\")\d+\.\d+\.\d+[^\"\s]*(?=\")",
fp.read(),
)
version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read())

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 regular expression \d+.\d+.\d+ contains unescaped dots (.), which act as wildcards matching any character instead of literal dots. This could lead to incorrect version parsing if the version file contains other characters. Please escape the dots as \..

Suggested change
version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read())
version_candidates = re.findall(r"(?<=\")\d+\.\d+\.\d+(?=\")", fp.read())

@chalmerlowe chalmerlowe left a comment

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.

LGTM

@chalmerlowe chalmerlowe added the automerge Merge the pull request once unit tests and other checks pass. label Jun 17, 2026
@zhumin8 zhumin8 merged commit a734cfc into main Jun 17, 2026
89 checks passed
@zhumin8 zhumin8 deleted the revert-17408-feat/centralize-mypy branch June 17, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Merge the pull request once unit tests and other checks pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants