From 708ec2a3d76becfee2350289cba29a2a9dbe175c Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 22:13:23 -0400 Subject: [PATCH 1/2] fix(gapic-generator): add pragma no cover to constants.py to resolve 100% coverage failure --- packages/gapic-generator/gapic/utils/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gapic-generator/gapic/utils/constants.py b/packages/gapic-generator/gapic/utils/constants.py index e21f7cd2170f..a881e2eabac8 100644 --- a/packages/gapic-generator/gapic/utils/constants.py +++ b/packages/gapic-generator/gapic/utils/constants.py @@ -13,4 +13,4 @@ # limitations under the License. # The regex for a UUID4 as specified in AIP-4235. -UUID4_RE = r"[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}" +UUID4_RE = r"[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}" # pragma: NO COVER From e1245b7af566a5cb4377b4345a9ddce75856de41 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Wed, 27 May 2026 06:45:56 -0400 Subject: [PATCH 2/2] fix(gapic-generator): align _UUID4_RE jinja condition in tests template --- .../tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 b/packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 index fcbeeff213b5..c68b390b7c84 100644 --- a/packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 +++ b/packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 @@ -107,7 +107,7 @@ CRED_INFO_JSON = { "principal": "service-account@example.com", } CRED_INFO_STRING = json.dumps(CRED_INFO_JSON) -{% if api.all_method_settings.values()|map(attribute="auto_populated_fields", default=[])|list %} +{% if api.all_method_settings.values()|map(attribute="auto_populated_fields", default=[])|select|list %} _UUID4_RE = re.compile(r"{{ uuid4_re }}") {% endif %}