From 9a5baa7df22b5389bfb83d8488ba12206ebec73f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 13:15:36 -0400 Subject: [PATCH] fix: Add async context manager return types (#433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Add async context manager return types chore: Mock return_value should not populate oneof message fields chore: Support snippet generation for services that only support REST transport chore: Update gapic-generator-python to v1.11.0 PiperOrigin-RevId: 545430278 Source-Link: https://github.com/googleapis/googleapis/commit/601b5326107eeb74800b426d1f9933faa233258a Source-Link: https://github.com/googleapis/googleapis-gen/commit/b3f18d0f6560a855022fd058865e7620479d7af9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjNmMThkMGY2NTYwYTg1NTAyMmZkMDU4ODY1ZTc2MjA0NzlkN2FmOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../services/video_intelligence_service/async_client.py | 2 +- .../services/video_intelligence_service/async_client.py | 2 +- .../services/video_intelligence_service/async_client.py | 2 +- .../services/video_intelligence_service/async_client.py | 2 +- .../streaming_video_intelligence_service/async_client.py | 2 +- .../services/video_intelligence_service/async_client.py | 2 +- .../snippet_metadata_google.cloud.videointelligence.v1.json | 2 +- ...snippet_metadata_google.cloud.videointelligence.v1beta2.json | 2 +- ...ippet_metadata_google.cloud.videointelligence.v1p1beta1.json | 2 +- ...ippet_metadata_google.cloud.videointelligence.v1p2beta1.json | 2 +- ...ippet_metadata_google.cloud.videointelligence.v1p3beta1.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/google/cloud/videointelligence_v1/services/video_intelligence_service/async_client.py b/google/cloud/videointelligence_v1/services/video_intelligence_service/async_client.py index 8e9f331a..3b2baca1 100644 --- a/google/cloud/videointelligence_v1/services/video_intelligence_service/async_client.py +++ b/google/cloud/videointelligence_v1/services/video_intelligence_service/async_client.py @@ -365,7 +365,7 @@ async def sample_annotate_video(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "VideoIntelligenceServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/videointelligence_v1beta2/services/video_intelligence_service/async_client.py b/google/cloud/videointelligence_v1beta2/services/video_intelligence_service/async_client.py index ab047992..afbd8b60 100644 --- a/google/cloud/videointelligence_v1beta2/services/video_intelligence_service/async_client.py +++ b/google/cloud/videointelligence_v1beta2/services/video_intelligence_service/async_client.py @@ -365,7 +365,7 @@ async def sample_annotate_video(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "VideoIntelligenceServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/videointelligence_v1p1beta1/services/video_intelligence_service/async_client.py b/google/cloud/videointelligence_v1p1beta1/services/video_intelligence_service/async_client.py index d9f1bc85..ccc0517b 100644 --- a/google/cloud/videointelligence_v1p1beta1/services/video_intelligence_service/async_client.py +++ b/google/cloud/videointelligence_v1p1beta1/services/video_intelligence_service/async_client.py @@ -365,7 +365,7 @@ async def sample_annotate_video(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "VideoIntelligenceServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/videointelligence_v1p2beta1/services/video_intelligence_service/async_client.py b/google/cloud/videointelligence_v1p2beta1/services/video_intelligence_service/async_client.py index afc2658b..e250682a 100644 --- a/google/cloud/videointelligence_v1p2beta1/services/video_intelligence_service/async_client.py +++ b/google/cloud/videointelligence_v1p2beta1/services/video_intelligence_service/async_client.py @@ -365,7 +365,7 @@ async def sample_annotate_video(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "VideoIntelligenceServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/videointelligence_v1p3beta1/services/streaming_video_intelligence_service/async_client.py b/google/cloud/videointelligence_v1p3beta1/services/streaming_video_intelligence_service/async_client.py index cbbcf812..da6edb50 100644 --- a/google/cloud/videointelligence_v1p3beta1/services/streaming_video_intelligence_service/async_client.py +++ b/google/cloud/videointelligence_v1p3beta1/services/streaming_video_intelligence_service/async_client.py @@ -335,7 +335,7 @@ def request_generator(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "StreamingVideoIntelligenceServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/videointelligence_v1p3beta1/services/video_intelligence_service/async_client.py b/google/cloud/videointelligence_v1p3beta1/services/video_intelligence_service/async_client.py index 80edaf02..829300af 100644 --- a/google/cloud/videointelligence_v1p3beta1/services/video_intelligence_service/async_client.py +++ b/google/cloud/videointelligence_v1p3beta1/services/video_intelligence_service/async_client.py @@ -365,7 +365,7 @@ async def sample_annotate_video(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "VideoIntelligenceServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1.json index e0ca792d..1f03d3b6 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "2.11.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1beta2.json b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1beta2.json index 665d6aa7..27c0821c 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1beta2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "2.11.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json index b35b020e..91bdfe52 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "2.11.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json index cfac439b..ac1ac90e 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "2.11.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json index 0617e1aa..91041a39 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "2.11.2" + "version": "0.1.0" }, "snippets": [ {