Skip to content

Commit 98bddda

Browse files
fix: Add async context manager return types (#11445)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent bf58f57 commit 98bddda

File tree

1,030 files changed

+115770
-709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,030 files changed

+115770
-709
lines changed

packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.5.3" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange_v1beta1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.5.3" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange_v1beta1/services/analytics_hub_service/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,7 @@ async def list_locations(
20402040
# Done; return the response.
20412041
return response
20422042

2043-
async def __aenter__(self):
2043+
async def __aenter__(self) -> "AnalyticsHubServiceAsyncClient":
20442044
return self
20452045

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

packages/google-cloud-bigquery-data-exchange/noxfile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,9 @@ def docfx(session):
305305

306306
session.install("-e", ".")
307307
session.install(
308-
"sphinx==4.0.1",
308+
"gcp-sphinx-docfx-yaml",
309309
"alabaster",
310310
"recommonmark",
311-
"gcp-sphinx-docfx-yaml",
312311
)
313312

314313
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateDataExchange
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-data-exchange
24+
25+
26+
# [START analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_data_exchange_v1beta1
35+
36+
37+
async def sample_create_data_exchange():
38+
# Create a client
39+
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()
40+
41+
# Initialize request argument(s)
42+
data_exchange = bigquery_data_exchange_v1beta1.DataExchange()
43+
data_exchange.display_name = "display_name_value"
44+
45+
request = bigquery_data_exchange_v1beta1.CreateDataExchangeRequest(
46+
parent="parent_value",
47+
data_exchange_id="data_exchange_id_value",
48+
data_exchange=data_exchange,
49+
)
50+
51+
# Make the request
52+
response = await client.create_data_exchange(request=request)
53+
54+
# Handle the response
55+
print(response)
56+
57+
# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateDataExchange
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-data-exchange
24+
25+
26+
# [START analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_data_exchange_v1beta1
35+
36+
37+
def sample_create_data_exchange():
38+
# Create a client
39+
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
40+
41+
# Initialize request argument(s)
42+
data_exchange = bigquery_data_exchange_v1beta1.DataExchange()
43+
data_exchange.display_name = "display_name_value"
44+
45+
request = bigquery_data_exchange_v1beta1.CreateDataExchangeRequest(
46+
parent="parent_value",
47+
data_exchange_id="data_exchange_id_value",
48+
data_exchange=data_exchange,
49+
)
50+
51+
# Make the request
52+
response = client.create_data_exchange(request=request)
53+
54+
# Handle the response
55+
print(response)
56+
57+
# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateListing
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-data-exchange
24+
25+
26+
# [START analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_data_exchange_v1beta1
35+
36+
37+
async def sample_create_listing():
38+
# Create a client
39+
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()
40+
41+
# Initialize request argument(s)
42+
listing = bigquery_data_exchange_v1beta1.Listing()
43+
listing.display_name = "display_name_value"
44+
45+
request = bigquery_data_exchange_v1beta1.CreateListingRequest(
46+
parent="parent_value",
47+
listing_id="listing_id_value",
48+
listing=listing,
49+
)
50+
51+
# Make the request
52+
response = await client.create_listing(request=request)
53+
54+
# Handle the response
55+
print(response)
56+
57+
# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateListing
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-data-exchange
24+
25+
26+
# [START analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_data_exchange_v1beta1
35+
36+
37+
def sample_create_listing():
38+
# Create a client
39+
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
40+
41+
# Initialize request argument(s)
42+
listing = bigquery_data_exchange_v1beta1.Listing()
43+
listing.display_name = "display_name_value"
44+
45+
request = bigquery_data_exchange_v1beta1.CreateListingRequest(
46+
parent="parent_value",
47+
listing_id="listing_id_value",
48+
listing=listing,
49+
)
50+
51+
# Make the request
52+
response = client.create_listing(request=request)
53+
54+
# Handle the response
55+
print(response)
56+
57+
# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeleteDataExchange
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-data-exchange
24+
25+
26+
# [START analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_data_exchange_v1beta1
35+
36+
37+
async def sample_delete_data_exchange():
38+
# Create a client
39+
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()
40+
41+
# Initialize request argument(s)
42+
request = bigquery_data_exchange_v1beta1.DeleteDataExchangeRequest(
43+
name="name_value",
44+
)
45+
46+
# Make the request
47+
await client.delete_data_exchange(request=request)
48+
49+
50+
# [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeleteDataExchange
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-data-exchange
24+
25+
26+
# [START analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_data_exchange_v1beta1
35+
36+
37+
def sample_delete_data_exchange():
38+
# Create a client
39+
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
40+
41+
# Initialize request argument(s)
42+
request = bigquery_data_exchange_v1beta1.DeleteDataExchangeRequest(
43+
name="name_value",
44+
)
45+
46+
# Make the request
47+
client.delete_data_exchange(request=request)
48+
49+
50+
# [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync]

0 commit comments

Comments
 (0)