MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / safe_version

Function safe_version

scripts/describe.py:171–185  ·  view source on GitHub ↗

Create a safe version of the verion string. Needed so that we can distinguish between versions and sub-collections in URIs. I.e. we don't want adsense_v1.1 to refer to the '1' collection in the v1 version of the adsense api. Args: version: string, The version string.

(version)

Source from the content-addressed store, hash-verified

169
170
171def safe_version(version):
172 """Create a safe version of the verion string.
173
174 Needed so that we can distinguish between versions
175 and sub-collections in URIs. I.e. we don't want
176 adsense_v1.1 to refer to the '1' collection in the v1
177 version of the adsense api.
178
179 Args:
180 version: string, The version string.
181 Returns:
182 The string with '.' replaced with '_'.
183 """
184
185 return version.replace(".", "_")
186
187
188def unsafe_version(version):

Callers 3

document_apiFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…