Skip to content

Commit fdee40a

Browse files
fix: Add async context manager return types (#539)
* 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: googleapis/googleapis@601b532 Source-Link: googleapis/googleapis-gen@b3f18d0 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 <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent a045743 commit fdee40a

File tree

16 files changed

+61
-37
lines changed

16 files changed

+61
-37
lines changed

packages/google-cloud-vision/google/cloud/vision_v1/services/image_annotator/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ async def sample_async_batch_annotate_files():
720720
# Done; return the response.
721721
return response
722722

723-
async def __aenter__(self):
723+
async def __aenter__(self) -> "ImageAnnotatorAsyncClient":
724724
return self
725725

726726
async def __aexit__(self, exc_type, exc, tb):

packages/google-cloud-vision/google/cloud/vision_v1/services/product_search/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2743,7 +2743,7 @@ async def sample_purge_products():
27432743
# Done; return the response.
27442744
return response
27452745

2746-
async def __aenter__(self):
2746+
async def __aenter__(self) -> "ProductSearchAsyncClient":
27472747
return self
27482748

27492749
async def __aexit__(self, exc_type, exc, tb):

packages/google-cloud-vision/google/cloud/vision_v1p1beta1/services/image_annotator/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ async def sample_batch_annotate_images():
324324
# Done; return the response.
325325
return response
326326

327-
async def __aenter__(self):
327+
async def __aenter__(self) -> "ImageAnnotatorAsyncClient":
328328
return self
329329

330330
async def __aexit__(self, exc_type, exc, tb):

packages/google-cloud-vision/google/cloud/vision_v1p2beta1/services/image_annotator/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ async def sample_async_batch_annotate_files():
457457
# Done; return the response.
458458
return response
459459

460-
async def __aenter__(self):
460+
async def __aenter__(self) -> "ImageAnnotatorAsyncClient":
461461
return self
462462

463463
async def __aexit__(self, exc_type, exc, tb):

packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/image_annotator/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ async def sample_async_batch_annotate_files():
458458
# Done; return the response.
459459
return response
460460

461-
async def __aenter__(self):
461+
async def __aenter__(self) -> "ImageAnnotatorAsyncClient":
462462
return self
463463

464464
async def __aexit__(self, exc_type, exc, tb):

packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/product_search/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,7 @@ async def sample_import_product_sets():
25922592
# Done; return the response.
25932593
return response
25942594

2595-
async def __aenter__(self):
2595+
async def __aenter__(self) -> "ProductSearchAsyncClient":
25962596
return self
25972597

25982598
async def __aexit__(self, exc_type, exc, tb):

packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/image_annotator/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ async def sample_async_batch_annotate_files():
708708
# Done; return the response.
709709
return response
710710

711-
async def __aenter__(self):
711+
async def __aenter__(self) -> "ImageAnnotatorAsyncClient":
712712
return self
713713

714714
async def __aexit__(self, exc_type, exc, tb):

packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/product_search/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2728,7 +2728,7 @@ async def sample_purge_products():
27282728
# Done; return the response.
27292729
return response
27302730

2731-
async def __aenter__(self):
2731+
async def __aenter__(self) -> "ProductSearchAsyncClient":
27322732
return self
27332733

27342734
async def __aexit__(self, exc_type, exc, tb):

packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-vision",
11-
"version": "3.4.3"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-vision",
11-
"version": "3.4.3"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)