diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 16f04c7cc2..57d048b62d 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -29,6 +29,12 @@ Execute unit tests by running one of the sessions prefixed with `unit-`. find gapic tests -name "*.py" -not -path 'tests/integration/goldens/*' | xargs autopep8 --diff --exit-code ``` +- Format sources in place: + + ``` + find gapic tests -name "*.py" -not -path 'tests/integration/goldens/*' | xargs autopep8 --in-place + ``` + ## Integration Tests - Run a single integration test for one API. This generates Python source code diff --git a/gapic/generator/generator.py b/gapic/generator/generator.py index 3014719c17..7d2b2cc95c 100644 --- a/gapic/generator/generator.py +++ b/gapic/generator/generator.py @@ -21,7 +21,7 @@ from typing import Any, DefaultDict, Dict, Mapping from hashlib import sha256 from collections import OrderedDict, defaultdict -from gapic.samplegen_utils.utils import coerce_response_name, is_valid_sample_cfg +from gapic.samplegen_utils.utils import coerce_response_name, is_valid_sample_cfg, render_format_string from gapic.samplegen_utils.types import DuplicateSample from gapic.samplegen import manifest, samplegen from gapic.generator import formatter @@ -62,6 +62,7 @@ def __init__(self, opts: Options) -> None: self._env.filters["sort_lines"] = utils.sort_lines self._env.filters["wrap"] = utils.wrap self._env.filters["coerce_response_name"] = coerce_response_name + self._env.filters["render_format_string"] = render_format_string # Add tests to determine type of expressions stored in strings self._env.tests["str_field_pb"] = utils.is_str_field_pb diff --git a/gapic/samplegen_utils/utils.py b/gapic/samplegen_utils/utils.py index 7cf0a14a39..27ccb50efa 100644 --- a/gapic/samplegen_utils/utils.py +++ b/gapic/samplegen_utils/utils.py @@ -18,7 +18,7 @@ import os import yaml -from typing import (Generator, Tuple) +from typing import (Generator, Tuple, List, Union) from gapic.samplegen_utils import types @@ -28,6 +28,25 @@ VALID_CONFIG_TYPE = "com.google.api.codegen.samplegen.v1p2.SampleConfigProto" +def render_format_string(s: str, expressions: List[str] = []) -> str: + """Given string s and a list of expressions, substitute each %s + in the string with {exp}. + + Arguments: + s (str): The string literal. + expressions (Optional[List[str]]): A list of expressions. + """ + + s = s.replace('\"', '\\\"') + + for exp in expressions: + # some expressions will contain references to "$resp" + exp = coerce_response_name(exp) + s = s.replace("%s", f"{{{exp}}}", 1) + + return s + + def coerce_response_name(s: str) -> str: # In the sample config, the "$resp" keyword is used to refer to the # item of interest as received by the corresponding calling form. diff --git a/gapic/templates/examples/feature_fragments.j2 b/gapic/templates/examples/feature_fragments.j2 index eda14df7e4..7938a648b6 100644 --- a/gapic/templates/examples/feature_fragments.j2 +++ b/gapic/templates/examples/feature_fragments.j2 @@ -27,10 +27,15 @@ {% endmacro %} {% macro print_string_formatting(string_list) %} + {% if string_list|length == 1 %} -"{{ string_list[0]|replace("%s", "{}")|replace('\"', '\\\"') }}" +"{{ string_list[0] | render_format_string }}" +{% elif string_list|length == 2 and string_list[0] == "%s" and string_list[1] == "$resp" %} +response {% else %} -"{{ string_list[0]|replace("%s", "{}")|replace('\"', '\\\"') }}".format({{ string_list[1:]|map("coerce_response_name")|join(", ") }}) +{# Note: This is the equivalent of render_format_string(string_list[0], string_list[1:] ) +# See https://jinja.palletsprojects.com/en/3.0.x/api/#custom-filters #} +f"{{ string_list[0] | render_format_string(string_list[1:]) }}" {% endif %} {% endmacro %} diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py index 633f8b0467..8147347e66 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py @@ -45,6 +45,6 @@ async def sample_analyze_iam_policy(): response = await client.analyze_iam_policy(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py index f3a40e1568..12e57510e8 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py @@ -51,6 +51,6 @@ async def sample_analyze_iam_policy_longrunning(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py index 6bfec27de9..a4e998a182 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py @@ -51,6 +51,6 @@ def sample_analyze_iam_policy_longrunning(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py index 22017d9960..1a02995511 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py @@ -45,6 +45,6 @@ def sample_analyze_iam_policy(): response = client.analyze_iam_policy(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py index f2f051da59..dcbb0b0159 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py @@ -42,6 +42,6 @@ async def sample_batch_get_assets_history(): response = await client.batch_get_assets_history(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py index ed2d78e9e6..035d76dedc 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py @@ -42,6 +42,6 @@ def sample_batch_get_assets_history(): response = client.batch_get_assets_history(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py index eb42919714..d0b4a37a3a 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py @@ -47,6 +47,6 @@ async def sample_create_feed(): response = await client.create_feed(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_CreateFeed_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py index c5a31c080d..9eb643290b 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py @@ -47,6 +47,6 @@ def sample_create_feed(): response = client.create_feed(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_CreateFeed_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py index 00c75331d9..39b41d605e 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py @@ -48,6 +48,6 @@ async def sample_export_assets(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_ExportAssets_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py index e4548eed7d..204c9e7c5c 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py @@ -48,6 +48,6 @@ def sample_export_assets(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_ExportAssets_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py index c4078151b7..ed6e4c7f2e 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py @@ -42,6 +42,6 @@ async def sample_get_feed(): response = await client.get_feed(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_GetFeed_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py index cb53327cce..c50a77f3a8 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py @@ -42,6 +42,6 @@ def sample_get_feed(): response = client.get_feed(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_GetFeed_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py index ff87a684fe..5e6b0a007c 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py @@ -41,6 +41,6 @@ async def sample_list_assets(): # Make the request page_result = client.list_assets(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_ListAssets_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py index 47ed9d149b..a7fb179d5f 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py @@ -41,6 +41,6 @@ def sample_list_assets(): # Make the request page_result = client.list_assets(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_ListAssets_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py index 396b767010..31a26bde20 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py @@ -42,6 +42,6 @@ async def sample_list_feeds(): response = await client.list_feeds(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_ListFeeds_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py index 816523c64b..9075f2cd9f 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py @@ -42,6 +42,6 @@ def sample_list_feeds(): response = client.list_feeds(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_ListFeeds_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py index 58fdd4b9bd..3893b85552 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py @@ -41,6 +41,6 @@ async def sample_search_all_iam_policies(): # Make the request page_result = client.search_all_iam_policies(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py index dbe303e7fb..53133196b1 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py @@ -41,6 +41,6 @@ def sample_search_all_iam_policies(): # Make the request page_result = client.search_all_iam_policies(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py index f0021cafdc..d97f46fb4f 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py @@ -41,6 +41,6 @@ async def sample_search_all_resources(): # Make the request page_result = client.search_all_resources(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_SearchAllResources_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py index ac0b998a06..30f66f6ef4 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py @@ -41,6 +41,6 @@ def sample_search_all_resources(): # Make the request page_result = client.search_all_resources(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py index 12dd103c4b..6cebe148df 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py @@ -45,6 +45,6 @@ async def sample_update_feed(): response = await client.update_feed(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_UpdateFeed_async] diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py index 3402c41d22..d2046c2d9b 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py @@ -45,6 +45,6 @@ def sample_update_feed(): response = client.update_feed(request=request) # Handle response - print("{}".format(response)) + print(response) # [END cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py index b08ce8febc..1e6b476581 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py @@ -43,6 +43,6 @@ async def sample_generate_access_token(): response = await client.generate_access_token(request=request) # Handle response - print("{}".format(response)) + print(response) # [END iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py index 357d62c459..3c4f4909dc 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py @@ -43,6 +43,6 @@ def sample_generate_access_token(): response = client.generate_access_token(request=request) # Handle response - print("{}".format(response)) + print(response) # [END iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py index d83bb8d933..4494e93ef3 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py @@ -43,6 +43,6 @@ async def sample_generate_id_token(): response = await client.generate_id_token(request=request) # Handle response - print("{}".format(response)) + print(response) # [END iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py index da92452b3d..b3bfb31938 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py @@ -43,6 +43,6 @@ def sample_generate_id_token(): response = client.generate_id_token(request=request) # Handle response - print("{}".format(response)) + print(response) # [END iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py index e71f7d3256..5455fe959a 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py @@ -43,6 +43,6 @@ async def sample_sign_blob(): response = await client.sign_blob(request=request) # Handle response - print("{}".format(response)) + print(response) # [END iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py index 40bd3ae561..ff60375d56 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py @@ -43,6 +43,6 @@ def sample_sign_blob(): response = client.sign_blob(request=request) # Handle response - print("{}".format(response)) + print(response) # [END iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py index 8ca3083307..c75f5ac006 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py @@ -43,6 +43,6 @@ async def sample_sign_jwt(): response = await client.sign_jwt(request=request) # Handle response - print("{}".format(response)) + print(response) # [END iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py index 8dc778a594..0d6e9322bc 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py @@ -43,6 +43,6 @@ def sample_sign_jwt(): response = client.sign_jwt(request=request) # Handle response - print("{}".format(response)) + print(response) # [END iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py index 9425509149..bfc49260eb 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py @@ -43,6 +43,6 @@ async def sample_create_bucket(): response = await client.create_bucket(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py index 490adb5296..b0546c1a71 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py @@ -43,6 +43,6 @@ def sample_create_bucket(): response = client.create_bucket(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py index c41f337710..3d473947f8 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py @@ -47,6 +47,6 @@ async def sample_create_exclusion(): response = await client.create_exclusion(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py index ac7e04733c..c9fe4d30f6 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py @@ -47,6 +47,6 @@ def sample_create_exclusion(): response = client.create_exclusion(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py index 0affba0c4b..068d1fa077 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py @@ -47,6 +47,6 @@ async def sample_create_sink(): response = await client.create_sink(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_CreateSink_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py index 8bc2129be0..34591a8a87 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py @@ -47,6 +47,6 @@ def sample_create_sink(): response = client.create_sink(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py index a9ced73e6a..555d13d0cb 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py @@ -43,6 +43,6 @@ async def sample_create_view(): response = await client.create_view(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_CreateView_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py index bbb9033c5c..518426012d 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py @@ -43,6 +43,6 @@ def sample_create_view(): response = client.create_view(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_CreateView_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py index 43ae4b5102..bbc4436506 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py @@ -42,6 +42,6 @@ async def sample_get_bucket(): response = await client.get_bucket(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetBucket_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py index b729d8de74..933db8359c 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py @@ -42,6 +42,6 @@ def sample_get_bucket(): response = client.get_bucket(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py index bc085f29b5..a12b7fffcc 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py @@ -42,6 +42,6 @@ async def sample_get_cmek_settings(): response = await client.get_cmek_settings(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py index b838221d5b..c252c6b12f 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py @@ -42,6 +42,6 @@ def sample_get_cmek_settings(): response = client.get_cmek_settings(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py index d0766aa6a9..7aab7cd630 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py @@ -42,6 +42,6 @@ async def sample_get_exclusion(): response = await client.get_exclusion(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py index 4f025180ef..6fd1b2108f 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py @@ -42,6 +42,6 @@ def sample_get_exclusion(): response = client.get_exclusion(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py index bc8889c48b..d945db6254 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py @@ -42,6 +42,6 @@ async def sample_get_sink(): response = await client.get_sink(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetSink_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py index 54360300ea..9c9172304d 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py @@ -42,6 +42,6 @@ def sample_get_sink(): response = client.get_sink(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetSink_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py index c280eb79b3..c68aa0551c 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py @@ -42,6 +42,6 @@ async def sample_get_view(): response = await client.get_view(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetView_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py index ca94c6088b..0de5e38b58 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py @@ -42,6 +42,6 @@ def sample_get_view(): response = client.get_view(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_GetView_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py index 0984985431..698255b560 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py @@ -41,6 +41,6 @@ async def sample_list_buckets(): # Make the request page_result = client.list_buckets(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py index a6b0fc001a..62f78c0e2a 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py @@ -41,6 +41,6 @@ def sample_list_buckets(): # Make the request page_result = client.list_buckets(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py index fa305a7f19..49c7788689 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py @@ -41,6 +41,6 @@ async def sample_list_exclusions(): # Make the request page_result = client.list_exclusions(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py index c47b051b0e..2a00c57c38 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py @@ -41,6 +41,6 @@ def sample_list_exclusions(): # Make the request page_result = client.list_exclusions(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py index 0f44922bf6..7e40c4f3cb 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py @@ -41,6 +41,6 @@ async def sample_list_sinks(): # Make the request page_result = client.list_sinks(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_ListSinks_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py index 81dc1c7dbf..99f7f0abb1 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py @@ -41,6 +41,6 @@ def sample_list_sinks(): # Make the request page_result = client.list_sinks(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py index 13ebc35295..a4843f371e 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py @@ -41,6 +41,6 @@ async def sample_list_views(): # Make the request page_result = client.list_views(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_ListViews_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py index a61e856411..d32a0aa110 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py @@ -41,6 +41,6 @@ def sample_list_views(): # Make the request page_result = client.list_views(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_ListViews_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py index 4343a258b4..a859113d5a 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py @@ -42,6 +42,6 @@ async def sample_update_bucket(): response = await client.update_bucket(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py index a2370594b3..2614b76d95 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py @@ -42,6 +42,6 @@ def sample_update_bucket(): response = client.update_bucket(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py index 6c868ad063..cd01d5b04a 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py @@ -42,6 +42,6 @@ async def sample_update_cmek_settings(): response = await client.update_cmek_settings(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py index 9b7f34e9d1..a679dfa441 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py @@ -42,6 +42,6 @@ def sample_update_cmek_settings(): response = client.update_cmek_settings(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py index 7ed53afeb7..bde70749f1 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py @@ -47,6 +47,6 @@ async def sample_update_exclusion(): response = await client.update_exclusion(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py index 6adacd542a..b974978fb8 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py @@ -47,6 +47,6 @@ def sample_update_exclusion(): response = client.update_exclusion(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py index 03c6b96b24..1973b924cd 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py @@ -47,6 +47,6 @@ async def sample_update_sink(): response = await client.update_sink(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py index 3bc9c59e33..9cc57a79f6 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py @@ -47,6 +47,6 @@ def sample_update_sink(): response = client.update_sink(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py index e2a1f97e08..5177171f8f 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py @@ -42,6 +42,6 @@ async def sample_update_view(): response = await client.update_view(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateView_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py index fb5811dead..164e01f49b 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py @@ -42,6 +42,6 @@ def sample_update_view(): response = client.update_view(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py index dc2f62c7d9..482bf96209 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py @@ -41,6 +41,6 @@ async def sample_list_log_entries(): # Make the request page_result = client.list_log_entries(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py index c1a6455f6d..b7d3b3ca02 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py @@ -41,6 +41,6 @@ def sample_list_log_entries(): # Make the request page_result = client.list_log_entries(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py index a0e119a926..0d943f89d9 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py @@ -41,6 +41,6 @@ async def sample_list_logs(): # Make the request page_result = client.list_logs(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_ListLogs_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py index 13a18b0ebd..218acc033b 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py @@ -41,6 +41,6 @@ def sample_list_logs(): # Make the request page_result = client.list_logs(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py index 8ecd94e6d8..6734d6a5c8 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py @@ -40,6 +40,6 @@ async def sample_list_monitored_resource_descriptors(): # Make the request page_result = client.list_monitored_resource_descriptors(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py index 5ca468a3a1..89da0c9c67 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py @@ -40,6 +40,6 @@ def sample_list_monitored_resource_descriptors(): # Make the request page_result = client.list_monitored_resource_descriptors(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py index 3202818c3f..69e7169598 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py @@ -41,6 +41,6 @@ async def sample_tail_log_entries(): # Make the request stream = await client.tail_log_entries([resource_names=['resource_names_value']]) async for response in stream: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py index 909a8e8aa2..6296d6783e 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py @@ -41,6 +41,6 @@ def sample_tail_log_entries(): # Make the request stream = client.tail_log_entries([resource_names=['resource_names_value']]) for response in stream: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py index 1a6981c740..71120d98a2 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py @@ -45,6 +45,6 @@ async def sample_write_log_entries(): response = await client.write_log_entries(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py index fdce118737..7da931be50 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py @@ -45,6 +45,6 @@ def sample_write_log_entries(): response = client.write_log_entries(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py index 02f97a044b..091013bb32 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py @@ -47,6 +47,6 @@ async def sample_create_log_metric(): response = await client.create_log_metric(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py index 0f2c282498..1d63becf0a 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py @@ -47,6 +47,6 @@ def sample_create_log_metric(): response = client.create_log_metric(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py index effabeb34f..9d225f360f 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py @@ -42,6 +42,6 @@ async def sample_get_log_metric(): response = await client.get_log_metric(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py index d49f387ac1..bb272a2d41 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py @@ -42,6 +42,6 @@ def sample_get_log_metric(): response = client.get_log_metric(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py index 23a495c163..240b775d36 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py @@ -41,6 +41,6 @@ async def sample_list_log_metrics(): # Make the request page_result = client.list_log_metrics(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py index dcc0784eda..9944c9443a 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py @@ -41,6 +41,6 @@ def sample_list_log_metrics(): # Make the request page_result = client.list_log_metrics(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py index 080789a8af..8bae70082b 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py @@ -47,6 +47,6 @@ async def sample_update_log_metric(): response = await client.update_log_metric(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async] diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py index 1c5ce5af9d..1f8631f375 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py @@ -47,6 +47,6 @@ def sample_update_log_metric(): response = client.update_log_metric(request=request) # Handle response - print("{}".format(response)) + print(response) # [END logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py index b3705e3af7..de3eddebdf 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py @@ -51,6 +51,6 @@ async def sample_create_instance(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_CreateInstance_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py index 16f1ed86af..d2e83c8ed0 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py @@ -51,6 +51,6 @@ def sample_create_instance(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_CreateInstance_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py index 58ad65f234..119b2e34ac 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py @@ -44,6 +44,6 @@ async def sample_delete_instance(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_DeleteInstance_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py index 85ea9b2e70..0d868c91cd 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py @@ -44,6 +44,6 @@ def sample_delete_instance(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_DeleteInstance_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py index 01a418c516..302890bb28 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py @@ -48,6 +48,6 @@ async def sample_export_instance(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_ExportInstance_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py index f00a794b53..adadccb214 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py @@ -48,6 +48,6 @@ def sample_export_instance(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_ExportInstance_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py index 23f4aa9135..85263ab3ad 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py @@ -44,6 +44,6 @@ async def sample_failover_instance(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_FailoverInstance_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py index 9de974244a..8dafe96046 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py @@ -44,6 +44,6 @@ def sample_failover_instance(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_FailoverInstance_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py index 87273f1da4..ed9d84195f 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py @@ -42,6 +42,6 @@ async def sample_get_instance(): response = await client.get_instance(request=request) # Handle response - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_GetInstance_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py index d72d199eb2..45fbec17c9 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py @@ -42,6 +42,6 @@ def sample_get_instance(): response = client.get_instance(request=request) # Handle response - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_GetInstance_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py index 4f5137291e..739afbf6b0 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py @@ -48,6 +48,6 @@ async def sample_import_instance(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_ImportInstance_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py index 3cbe064838..2f03a78c6f 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py @@ -48,6 +48,6 @@ def sample_import_instance(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_ImportInstance_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py index 9ef268347e..93268aa42c 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py @@ -41,6 +41,6 @@ async def sample_list_instances(): # Make the request page_result = client.list_instances(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_ListInstances_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py index 5cbdd38184..196f5ebcbf 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py @@ -41,6 +41,6 @@ def sample_list_instances(): # Make the request page_result = client.list_instances(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_ListInstances_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py index cc2340794a..3ecf913760 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py @@ -49,6 +49,6 @@ async def sample_update_instance(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_UpdateInstance_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py index a98f88b579..16da68c748 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py @@ -49,6 +49,6 @@ def sample_update_instance(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_UpdateInstance_sync] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py index b170fb02d9..dee9b3f826 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py @@ -45,6 +45,6 @@ async def sample_upgrade_instance(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_UpgradeInstance_async] diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py index c1b6caf8b5..b14f29675c 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py @@ -45,6 +45,6 @@ def sample_upgrade_instance(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_async.py index 6d6afcf994..492aa22271 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_async.py @@ -41,6 +41,6 @@ async def sample_list_resources(): # Make the request page_result = client.list_resources(request=request) async for response in page_result: - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_ListResources_async] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py index 9ca10fc35c..817f869247 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py @@ -41,6 +41,6 @@ def sample_list_resources(): # Make the request page_result = client.list_resources(request=request) for response in page_result: - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_ListResources_sync] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py index d34f0a980d..98190750d5 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py @@ -41,6 +41,6 @@ async def sample_method_bidi_streaming(): # Make the request stream = await client.method_bidi_streaming([my_string="my_string_value"]) async for response in stream: - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_MethodBidiStreaming_async] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py index daba69f1b6..de6ffb254d 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py @@ -41,6 +41,6 @@ def sample_method_bidi_streaming(): # Make the request stream = client.method_bidi_streaming([my_string="my_string_value"]) for response in stream: - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_MethodBidiStreaming_sync] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py index 61497f4a43..392241b5e2 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py @@ -52,6 +52,6 @@ async def sample_method_lro_signatures(): print("Waiting for operation to complete...") response = await operation.result() - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_MethodLroSignatures_async] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py index ea51e76e12..e0fa332206 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py @@ -52,6 +52,6 @@ def sample_method_lro_signatures(): print("Waiting for operation to complete...") response = operation.result() - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_MethodLroSignatures_sync] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py index f7351c4b36..85cf60ef6c 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py @@ -50,6 +50,6 @@ async def sample_method_one_signature(): response = await client.method_one_signature(request=request) # Handle response - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_MethodOneSignature_async] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py index dcb1a81f0e..d09678e58a 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py @@ -50,6 +50,6 @@ def sample_method_one_signature(): response = client.method_one_signature(request=request) # Handle response - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_MethodOneSignature_sync] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py index 785c22899a..5dfc1b09ba 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py @@ -49,6 +49,6 @@ async def sample_method_server_streaming(): # Make the request stream = await client.method_server_streaming(request=request) async for response in stream: - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_MethodServerStreaming_async] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py index 5894bff3e9..92782bcad3 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py @@ -49,6 +49,6 @@ def sample_method_server_streaming(): # Make the request stream = client.method_server_streaming(request=request) for response in stream: - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_MethodServerStreaming_sync] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py index fee612e387..2bc72ff6d2 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py @@ -43,6 +43,6 @@ async def sample_one_of_method(): response = await client.one_of_method(request=request) # Handle response - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_OneOfMethod_async] diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py index 71efe54950..ce2a728843 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py @@ -43,6 +43,6 @@ def sample_one_of_method(): response = client.one_of_method(request=request) # Handle response - print("{}".format(response)) + print(response) # [END mollusca_generated_mollusca_v1_Snippets_OneOfMethod_sync] diff --git a/tests/unit/samplegen/golden_snippets/sample_basic.py b/tests/unit/samplegen/golden_snippets/sample_basic.py index b1fdedea41..c6c44239c8 100644 --- a/tests/unit/samplegen/golden_snippets/sample_basic.py +++ b/tests/unit/samplegen/golden_snippets/sample_basic.py @@ -51,6 +51,6 @@ def sample_classify(video, location): response = client.classify(request=request) # Handle response - print("Mollusc is a \"{}\"".format(response.taxonomy)) + print(f"Mollusc is a \"{response.taxonomy}\"") # [END mollusc_classify_sync] diff --git a/tests/unit/samplegen/golden_snippets/sample_basic_async.py b/tests/unit/samplegen/golden_snippets/sample_basic_async.py index 59fde511d2..8ad414a78f 100644 --- a/tests/unit/samplegen/golden_snippets/sample_basic_async.py +++ b/tests/unit/samplegen/golden_snippets/sample_basic_async.py @@ -51,6 +51,6 @@ async def sample_classify(video, location): response = await client.classify(request=request) # Handle response - print("Mollusc is a \"{}\"".format(response.taxonomy)) + print(f"Mollusc is a \"{response.taxonomy}\"") # [END mollusc_classify_sync] diff --git a/tests/unit/samplegen/golden_snippets/sample_basic_unflattenable.py b/tests/unit/samplegen/golden_snippets/sample_basic_unflattenable.py index b1fdedea41..c6c44239c8 100644 --- a/tests/unit/samplegen/golden_snippets/sample_basic_unflattenable.py +++ b/tests/unit/samplegen/golden_snippets/sample_basic_unflattenable.py @@ -51,6 +51,6 @@ def sample_classify(video, location): response = client.classify(request=request) # Handle response - print("Mollusc is a \"{}\"".format(response.taxonomy)) + print(f"Mollusc is a \"{response.taxonomy}\"") # [END mollusc_classify_sync] diff --git a/tests/unit/samplegen/test_integration.py b/tests/unit/samplegen/test_integration.py index 95b7e74f53..75ae35ec5a 100644 --- a/tests/unit/samplegen/test_integration.py +++ b/tests/unit/samplegen/test_integration.py @@ -44,6 +44,7 @@ ) env.filters['snake_case'] = utils.to_snake_case env.filters['coerce_response_name'] = gapic_utils.coerce_response_name +env.filters['render_format_string'] = gapic_utils.render_format_string def golden_snippet(filename: str) -> str: diff --git a/tests/unit/samplegen/test_template.py b/tests/unit/samplegen/test_template.py index edf59a925f..3d1b3cff26 100644 --- a/tests/unit/samplegen/test_template.py +++ b/tests/unit/samplegen/test_template.py @@ -49,6 +49,7 @@ def check_template(template_fragment, expected_output, **kwargs): env.filters['snake_case'] = utils.to_snake_case env.filters['coerce_response_name'] = sample_utils.coerce_response_name + env.filters['render_format_string'] = sample_utils.render_format_string template = env.get_template("template_fragment") text = template.render(**kwargs) @@ -345,7 +346,7 @@ def test_render_print_args(): {{ frags.render_print(["$resp %s %s", "$resp.squids", "$resp.clams"]) }} ''', ''' - print("$resp {} {}".format(response.squids, response.clams)) + print(f"$resp {response.squids} {response.clams}") ''' ) @@ -446,7 +447,7 @@ def test_write_file(): "contents": "$resp.photo"}) }} ''', ''' - with open("specimen-{}".format(response.species), "wb") as f: + with open(f"specimen-{response.species}", "wb") as f: f.write(response.photo) ''' ) @@ -462,7 +463,7 @@ def test_dispatch_write_file(): "contents": "$resp.photo"}})}} ''', ''' - with open("specimen-{}".format(response.species), "wb") as f: + with open(f"specimen-{response.species}", "wb") as f: f.write(response.photo) ''' @@ -477,7 +478,7 @@ def test_collection_loop(): ''', ''' for m in response.molluscs: - print("Mollusc: {}".format(m)) + print(f"Mollusc: {m}") ''', @@ -494,7 +495,7 @@ def test_dispatch_collection_loop(): {{ frags.dispatch_statement(statement) }}''', ''' for m in molluscs: - print("Mollusc: {}".format(m)) + print(f"Mollusc: {m}") @@ -513,7 +514,7 @@ def test_map_loop(): }}''', ''' for cls, example in response.molluscs.items(): - print("A {} is a {}".format(example, cls)) + print(f"A {example} is a {cls}") ''', @@ -533,7 +534,7 @@ def test_map_loop_no_key(): ''', ''' for example in response.molluscs.values(): - print("A {} is a mollusc".format(example)) + print(f"A {example} is a mollusc") ''', @@ -552,7 +553,7 @@ def test_map_loop_no_value(): ''', ''' for cls in response.molluscs.keys(): - print("A {} is a mollusc".format(cls)) + print(f"A {cls} is a mollusc") ''', @@ -570,7 +571,7 @@ def test_dispatch_map_loop(): ''', ''' for cls, example in molluscs.items(): - print("A {} is a {}".format(example, cls)) + print(f"A {example} is a {cls}") @@ -618,7 +619,7 @@ def test_render_nested_loop_collection(): for m in response.molluscs: for t in m.tentacles: for s in t.suckers: - print("Sucker: {}".format(s)) + print(f"Sucker: {s}") @@ -671,7 +672,7 @@ def test_render_nested_loop_map(): for klass, orders in response.molluscs.items(): for order, families in orders.items(): for family, ex in families.items(): - print("Example: {}".format(ex)) + print(f"Example: {ex}")