Skip to content

Commit f7c5d9c

Browse files
fix: Add async context manager return types (#610)
* 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 * 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 * 🦉 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 5cd9d0c commit f7c5d9c

6 files changed

Lines changed: 4 additions & 6 deletions

File tree

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_read/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ async def sample_split_read_stream():
612612
# Done; return the response.
613613
return response
614614

615-
async def __aenter__(self):
615+
async def __aenter__(self) -> "BigQueryReadAsyncClient":
616616
return self
617617

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

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/services/big_query_write/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ async def sample_flush_rows():
946946
# Done; return the response.
947947
return response
948948

949-
async def __aenter__(self):
949+
async def __aenter__(self) -> "BigQueryWriteAsyncClient":
950950
return self
951951

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

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1beta2/services/big_query_read/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ async def sample_split_read_stream():
615615
# Done; return the response.
616616
return response
617617

618-
async def __aenter__(self):
618+
async def __aenter__(self) -> "BigQueryReadAsyncClient":
619619
return self
620620

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

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ async def sample_flush_rows():
918918
# Done; return the response.
919919
return response
920920

921-
async def __aenter__(self):
921+
async def __aenter__(self) -> "BigQueryWriteAsyncClient":
922922
return self
923923

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

packages/google-cloud-bigquery-storage/tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ def test_create_read_session(request_type, transport: str = "grpc"):
705705
estimated_total_physical_file_size=3608,
706706
estimated_row_count=2047,
707707
trace_id="trace_id_value",
708-
avro_schema=avro.AvroSchema(schema="schema_value"),
709708
)
710709
response = client.create_read_session(request)
711710

packages/google-cloud-bigquery-storage/tests/unit/gapic/bigquery_storage_v1beta2/test_big_query_read.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ def test_create_read_session(request_type, transport: str = "grpc"):
703703
name="name_value",
704704
data_format=stream.DataFormat.AVRO,
705705
table="table_value",
706-
avro_schema=avro.AvroSchema(schema="schema_value"),
707706
)
708707
response = client.create_read_session(request)
709708

0 commit comments

Comments
 (0)