diff --git a/google/cloud/video/stitcher_v1/services/video_stitcher_service/async_client.py b/google/cloud/video/stitcher_v1/services/video_stitcher_service/async_client.py index b2b64ea..0e541f9 100644 --- a/google/cloud/video/stitcher_v1/services/video_stitcher_service/async_client.py +++ b/google/cloud/video/stitcher_v1/services/video_stitcher_service/async_client.py @@ -3363,7 +3363,7 @@ async def cancel_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "VideoStitcherServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/samples/generated_samples/snippet_metadata_google.cloud.video.stitcher.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.video.stitcher.v1.json index ed5db8e..98e6890 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.video.stitcher.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.video.stitcher.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-video-stitcher", - "version": "0.7.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/tests/unit/gapic/stitcher_v1/test_video_stitcher_service.py b/tests/unit/gapic/stitcher_v1/test_video_stitcher_service.py index 1999e92..3b0fc6c 100644 --- a/tests/unit/gapic/stitcher_v1/test_video_stitcher_service.py +++ b/tests/unit/gapic/stitcher_v1/test_video_stitcher_service.py @@ -1402,9 +1402,11 @@ async def test_list_cdn_keys_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_cdn_keys(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1433,7 +1435,6 @@ def test_get_cdn_key(request_type, transport: str = "grpc"): call.return_value = cdn_keys.CdnKey( name="name_value", hostname="hostname_value", - google_cdn_key=cdn_keys.GoogleCdnKey(private_key=b"private_key_blob"), ) response = client.get_cdn_key(request) @@ -3077,9 +3078,11 @@ async def test_list_vod_stitch_details_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_vod_stitch_details(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3767,9 +3770,11 @@ async def test_list_vod_ad_tag_details_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_vod_ad_tag_details(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4457,9 +4462,11 @@ async def test_list_live_ad_tag_details_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_live_ad_tag_details(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5376,9 +5383,11 @@ async def test_list_slates_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_slates(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7286,9 +7295,11 @@ async def test_list_live_configs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_live_configs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token