fix(gapic-generator): add pragma to constants.py to resolve coverage failure and correct if block#17268
Merged
Merged
Conversation
…100% coverage failure
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds a coverage exclusion comment to the UUID4_RE constant in packages/gapic-generator/gapic/utils/constants.py. The reviewer pointed out that the exclusion comment should be in lowercase (# pragma: no cover) instead of uppercase to ensure it is correctly recognized by coverage.py.
constants.py to resolve coverage failure and correct if block
parthea
approved these changes
May 27, 2026
parthea
pushed a commit
that referenced
this pull request
May 27, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.15.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:234b9d1f2ddb057ed7ac6a38db0bf8163d839c65c6cf88ade52530cddebce59e <details><summary>gapic-generator: v1.34.0</summary> ## [v1.34.0](gapic-generator-v1.33.0...gapic-generator-v1.34.0) (2026-05-27) ### Bug Fixes * add pragma to `constants.py` to resolve coverage failure and correct `if` block (#17268) ([1436a23](1436a23c)) * update incorrect urls in setup.py to point at monorepo vs splitrepo (#17237) ([eaed04b](eaed04ba)) </details>
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.
During another PR, a failure in the cover nox session pointed at a lack of unit test coverage for this recent addition to the repo. As a constant, there is little benefit to instituting a unit test here. Adds
# pragma: NO COVERtoconstants.pyto resolve the 100% coverage check failure.In addition a
selectfunction was inadvertently left out of anifcode block to correctly respond when feature does NOT haveauto_populated_fieldsduring a recent generator update (~ 20260512).auto_populated_fieldsand have been generated very recently. In this case, during updates togoogle-cloud-logging, we ran into this issue.