Skip to content

Commit cd6b66e

Browse files
committed
fix(generator): address PR review comments in _compat.py.j2
1 parent 926eb3c commit cd6b66e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub

packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/_compat.py.j2

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# {% include '_license.j2' %}
22

3+
"""A fallback module for `google.api_core.gapic_v1.request` for backward compatibility.
4+
"""
5+
36
import uuid
47

58
try:
69
from google.api_core.gapic_v1.request import setup_request_id # type: ignore
7-
except ImportError: # pragma: NO COVER
10+
except ImportError:
811
# TODO(https://github.com/googleapis/google-cloud-python/issues/17813): Remove this fallback when google-api-core >= 2.26.0 is the minimum required version.
9-
def setup_request_id(request, field_name: str, is_proto3_optional: bool): # pragma: NO COVER
12+
def setup_request_id(request, field_name: str, is_proto3_optional: bool):
1013
"""Populate a UUID4 field in the request if it is not already set.
1114

1215
Args:

0 commit comments

Comments
 (0)