diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 16f04c7cc..57d048b62 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 3014719c1..7d2b2cc95 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 7cf0a14a3..27ccb50ef 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 eda14df7e..7938a648b 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 633f8b046..8147347e6 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 f3a40e156..12e57510e 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 6bfec27de..a4e998a18 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 22017d996..1a0299551 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 f2f051da5..dcbb0b015 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 ed2d78e9e..035d76ded 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 eb4291971..d0b4a37a3 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 c5a31c080..9eb643290 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 00c75331d..39b41d605 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 e4548eed7..204c9e7c5 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 c4078151b..ed6e4c7f2 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 cb53327cc..c50a77f3a 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 ff87a684f..5e6b0a007 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 47ed9d149..a7fb179d5 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 396b76701..31a26bde2 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 816523c64..9075f2cd9 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 58fdd4b9b..3893b8555 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 dbe303e7f..53133196b 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 f0021cafd..d97f46fb4 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 ac0b998a0..30f66f6ef 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 12dd103c4..6cebe148d 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 3402c41d2..d2046c2d9 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 b08ce8feb..1e6b47658 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 357d62c45..3c4f4909d 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 d83bb8d93..4494e93ef 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 da92452b3..b3bfb3193 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 e71f7d325..5455fe959 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 40bd3ae56..ff60375d5 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 8ca308330..c75f5ac00 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 8dc778a59..0d6e9322b 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 942550914..bfc49260e 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 490adb529..b0546c1a7 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 c41f33771..3d473947f 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 ac7e04733..c9fe4d30f 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 0affba0c4..068d1fa07 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 8bc2129be..34591a8a8 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 a9ced73e6..555d13d0c 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 bbb9033c5..518426012 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 43ae4b510..bbc443650 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 b729d8de7..933db8359 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 bc085f29b..a12b7fffc 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 b838221d5..c252c6b12 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 d0766aa6a..7aab7cd63 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 4f025180e..6fd1b2108 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 bc8889c48..d945db625 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 54360300e..9c9172304 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 c280eb79b..c68aa0551 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 ca94c6088..0de5e38b5 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 098498543..698255b56 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 a6b0fc001..62f78c0e2 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 fa305a7f1..49c778868 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 c47b051b0..2a00c57c3 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 0f44922bf..7e40c4f3c 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 81dc1c7db..99f7f0abb 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 13ebc3529..a4843f371 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 a61e85641..d32a0aa11 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 4343a258b..a859113d5 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 a2370594b..2614b76d9 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 6c868ad06..cd01d5b04 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 9b7f34e9d..a679dfa44 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 7ed53afeb..bde70749f 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 6adacd542..b974978fb 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 03c6b96b2..1973b924c 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 3bc9c59e3..9cc57a79f 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 e2a1f97e0..5177171f8 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 fb5811dea..164e01f49 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 dc2f62c7d..482bf9620 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 c1a6455f6..b7d3b3ca0 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 a0e119a92..0d943f89d 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 13a18b0eb..218acc033 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 8ecd94e6d..6734d6a5c 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 5ca468a3a..89da0c9c6 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 3202818c3..69e716959 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 909a8e8aa..6296d6783 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 1a6981c74..71120d98a 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 fdce11873..7da931be5 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 02f97a044..091013bb3 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 0f2c28249..1d63becf0 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 effabeb34..9d225f360 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 d49f387ac..bb272a2d4 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 23a495c16..240b775d3 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 dcc0784ed..9944c9443 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 080789a8a..8bae70082 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 1c5ce5af9..1f8631f37 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 b3705e3af..de3eddebd 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 16f1ed86a..d2e83c8ed 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 58ad65f23..119b2e34a 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 85ea9b2e7..0d868c91c 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 01a418c51..302890bb2 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 f00a794b5..adadccb21 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 23f4aa913..85263ab3a 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 9de974244..8dafe9604 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 87273f1da..ed9d84195 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 d72d199eb..45fbec17c 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 4f5137291..739afbf6b 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 3cbe06483..2f03a78c6 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 9ef268347..93268aa42 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 5cbdd3818..196f5ebcb 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 cc2340794..3ecf91376 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 a98f88b57..16da68c74 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 b170fb02d..dee9b3f82 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 c1b6caf8b..b14f29675 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 6d6afcf99..492aa2227 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 9ca10fc35..817f86924 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 d34f0a980..98190750d 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 daba69f1b..de6ffb254 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 61497f4a4..392241b5e 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 ea51e76e1..e0fa33220 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 f7351c4b3..85cf60ef6 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 dcb1a81f0..d09678e58 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 785c22899..5dfc1b09b 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 5894bff3e..92782bcad 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 fee612e38..2bc72ff6d 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 71efe5495..ce2a72884 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 b1fdedea4..c6c44239c 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 59fde511d..8ad414a78 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 b1fdedea4..c6c44239c 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 95b7e74f5..75ae35ec5 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 edf59a925..3d1b3cff2 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}")