Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6e1eb67

Browse filesBrowse files
chore: use gapic-generator-python 0.56.2 (#49)
* chore: update Java and Python dependencies PiperOrigin-RevId: 408420890 Source-Link: googleapis/googleapis@2921f9f Source-Link: googleapis/googleapis-gen@6598ca8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 * 🦉 Updates from OwlBot 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 78349b0 commit 6e1eb67
Copy full SHA for 6e1eb67

File tree

Expand file treeCollapse file tree

6 files changed

+78
-38
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+78
-38
lines changed

‎packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/async_client.py

Copy file name to clipboardExpand all lines: packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/async_client.py
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919
from typing import Dict, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

22-
from google.api_core.client_options import ClientOptions # type: ignore
23-
from google.api_core import exceptions as core_exceptions # type: ignore
24-
from google.api_core import gapic_v1 # type: ignore
25-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core.client_options import ClientOptions
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828

29-
OptionalRetry = Union[retries.Retry, object]
29+
try:
30+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
31+
except AttributeError: # pragma: NO COVER
32+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3033

3134
from google.api_core import operation # type: ignore
3235
from google.api_core import operation_async # type: ignore

‎packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/client.py

Copy file name to clipboardExpand all lines: packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/client.py
+17-8Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,25 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17-
from distutils import util
1817
import os
1918
import re
2019
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2120
import pkg_resources
2221

23-
from google.api_core import client_options as client_options_lib # type: ignore
24-
from google.api_core import exceptions as core_exceptions # type: ignore
25-
from google.api_core import gapic_v1 # type: ignore
26-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core import client_options as client_options_lib
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2726
from google.auth import credentials as ga_credentials # type: ignore
2827
from google.auth.transport import mtls # type: ignore
2928
from google.auth.transport.grpc import SslCredentials # type: ignore
3029
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3130
from google.oauth2 import service_account # type: ignore
3231

33-
OptionalRetry = Union[retries.Retry, object]
32+
try:
33+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
34+
except AttributeError: # pragma: NO COVER
35+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3436

3537
from google.api_core import operation # type: ignore
3638
from google.api_core import operation_async # type: ignore
@@ -289,8 +291,15 @@ def __init__(
289291
client_options = client_options_lib.ClientOptions()
290292

291293
# Create SSL credentials for mutual TLS if needed.
292-
use_client_cert = bool(
293-
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
294+
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
295+
"true",
296+
"false",
297+
):
298+
raise ValueError(
299+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
300+
)
301+
use_client_cert = (
302+
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
294303
)
295304

296305
client_cert_source_func = None

‎packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/base.py

Copy file name to clipboardExpand all lines: packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/base.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
import pkg_resources
1919

2020
import google.auth # type: ignore
21-
import google.api_core # type: ignore
22-
from google.api_core import exceptions as core_exceptions # type: ignore
23-
from google.api_core import gapic_v1 # type: ignore
24-
from google.api_core import retry as retries # type: ignore
25-
from google.api_core import operations_v1 # type: ignore
21+
import google.api_core
22+
from google.api_core import exceptions as core_exceptions
23+
from google.api_core import gapic_v1
24+
from google.api_core import retry as retries
25+
from google.api_core import operations_v1
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828

‎packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc.py

Copy file name to clipboardExpand all lines: packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import warnings
1717
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import grpc_helpers # type: ignore
20-
from google.api_core import operations_v1 # type: ignore
21-
from google.api_core import gapic_v1 # type: ignore
19+
from google.api_core import grpc_helpers
20+
from google.api_core import operations_v1
21+
from google.api_core import gapic_v1
2222
import google.auth # type: ignore
2323
from google.auth import credentials as ga_credentials # type: ignore
2424
from google.auth.transport.grpc import SslCredentials # type: ignore

‎packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc_asyncio.py

Copy file name to clipboardExpand all lines: packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/services/data_fusion/transports/grpc_asyncio.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import warnings
1717
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import gapic_v1 # type: ignore
20-
from google.api_core import grpc_helpers_async # type: ignore
21-
from google.api_core import operations_v1 # type: ignore
19+
from google.api_core import gapic_v1
20+
from google.api_core import grpc_helpers_async
21+
from google.api_core import operations_v1
2222
from google.auth import credentials as ga_credentials # type: ignore
2323
from google.auth.transport.grpc import SslCredentials # type: ignore
2424

‎packages/google-cloud-data-fusion/tests/unit/gapic/data_fusion_v1/test_data_fusion.py

Copy file name to clipboardExpand all lines: packages/google-cloud-data-fusion/tests/unit/gapic/data_fusion_v1/test_data_fusion.py
+42-14Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,9 @@ def test_list_available_versions_flattened():
634634
# request object values.
635635
assert len(call.mock_calls) == 1
636636
_, args, _ = call.mock_calls[0]
637-
assert args[0].parent == "parent_value"
637+
arg = args[0].parent
638+
mock_val = "parent_value"
639+
assert arg == mock_val
638640

639641

640642
def test_list_available_versions_flattened_error():
@@ -670,7 +672,9 @@ async def test_list_available_versions_flattened_async():
670672
# request object values.
671673
assert len(call.mock_calls)
672674
_, args, _ = call.mock_calls[0]
673-
assert args[0].parent == "parent_value"
675+
arg = args[0].parent
676+
mock_val = "parent_value"
677+
assert arg == mock_val
674678

675679

676680
@pytest.mark.asyncio
@@ -1471,9 +1475,15 @@ def test_create_instance_flattened():
14711475
# request object values.
14721476
assert len(call.mock_calls) == 1
14731477
_, args, _ = call.mock_calls[0]
1474-
assert args[0].parent == "parent_value"
1475-
assert args[0].instance == datafusion.Instance(name="name_value")
1476-
assert args[0].instance_id == "instance_id_value"
1478+
arg = args[0].parent
1479+
mock_val = "parent_value"
1480+
assert arg == mock_val
1481+
arg = args[0].instance
1482+
mock_val = datafusion.Instance(name="name_value")
1483+
assert arg == mock_val
1484+
arg = args[0].instance_id
1485+
mock_val = "instance_id_value"
1486+
assert arg == mock_val
14771487

14781488

14791489
def test_create_instance_flattened_error():
@@ -1514,9 +1524,15 @@ async def test_create_instance_flattened_async():
15141524
# request object values.
15151525
assert len(call.mock_calls)
15161526
_, args, _ = call.mock_calls[0]
1517-
assert args[0].parent == "parent_value"
1518-
assert args[0].instance == datafusion.Instance(name="name_value")
1519-
assert args[0].instance_id == "instance_id_value"
1527+
arg = args[0].parent
1528+
mock_val = "parent_value"
1529+
assert arg == mock_val
1530+
arg = args[0].instance
1531+
mock_val = datafusion.Instance(name="name_value")
1532+
assert arg == mock_val
1533+
arg = args[0].instance_id
1534+
mock_val = "instance_id_value"
1535+
assert arg == mock_val
15201536

15211537

15221538
@pytest.mark.asyncio
@@ -1679,7 +1695,9 @@ def test_delete_instance_flattened():
16791695
# request object values.
16801696
assert len(call.mock_calls) == 1
16811697
_, args, _ = call.mock_calls[0]
1682-
assert args[0].name == "name_value"
1698+
arg = args[0].name
1699+
mock_val = "name_value"
1700+
assert arg == mock_val
16831701

16841702

16851703
def test_delete_instance_flattened_error():
@@ -1713,7 +1731,9 @@ async def test_delete_instance_flattened_async():
17131731
# request object values.
17141732
assert len(call.mock_calls)
17151733
_, args, _ = call.mock_calls[0]
1716-
assert args[0].name == "name_value"
1734+
arg = args[0].name
1735+
mock_val = "name_value"
1736+
assert arg == mock_val
17171737

17181738

17191739
@pytest.mark.asyncio
@@ -1880,8 +1900,12 @@ def test_update_instance_flattened():
18801900
# request object values.
18811901
assert len(call.mock_calls) == 1
18821902
_, args, _ = call.mock_calls[0]
1883-
assert args[0].instance == datafusion.Instance(name="name_value")
1884-
assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"])
1903+
arg = args[0].instance
1904+
mock_val = datafusion.Instance(name="name_value")
1905+
assert arg == mock_val
1906+
arg = args[0].update_mask
1907+
mock_val = field_mask_pb2.FieldMask(paths=["paths_value"])
1908+
assert arg == mock_val
18851909

18861910

18871911
def test_update_instance_flattened_error():
@@ -1920,8 +1944,12 @@ async def test_update_instance_flattened_async():
19201944
# request object values.
19211945
assert len(call.mock_calls)
19221946
_, args, _ = call.mock_calls[0]
1923-
assert args[0].instance == datafusion.Instance(name="name_value")
1924-
assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"])
1947+
arg = args[0].instance
1948+
mock_val = datafusion.Instance(name="name_value")
1949+
assert arg == mock_val
1950+
arg = args[0].update_mask
1951+
mock_val = field_mask_pb2.FieldMask(paths=["paths_value"])
1952+
assert arg == mock_val
19251953

19261954

19271955
@pytest.mark.asyncio

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.