Skip to content

Commit

Permalink
docs: show inheritance in types reference (#91)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈



- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 339292950
Source-Link: googleapis/googleapis@07d41a7
PiperOrigin-RevId: 339268186
Source-Link: googleapis/googleapis@6516b52
PiperOrigin-RevId: 338646463
Source-Link: googleapis/googleapis@20b11df
PiperOrigin-RevId: 338489505
Source-Link: googleapis/googleapis@4b34a08
  • Loading branch information
yoshi-automation committed Nov 4, 2020
1 parent e9102e2 commit e5fd4e6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/bigquery_storage_v1/types.rst
Expand Up @@ -3,3 +3,4 @@ Types for Google Cloud Bigquery Storage v1 API

.. automodule:: google.cloud.bigquery_storage_v1.types
:members:
:show-inheritance:
Expand Up @@ -103,13 +103,16 @@ def __init__(
google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
and ``credentials_file`` are passed.
"""
self._ssl_channel_credentials = ssl_channel_credentials

if channel:
# Sanity check: Ensure that channel and credentials are not both
# provided.
credentials = False

# If a channel was explicitly provided, set it.
self._grpc_channel = channel
self._ssl_channel_credentials = None
elif api_mtls_endpoint:
warnings.warn(
"api_mtls_endpoint and client_cert_source are deprecated",
Expand Down Expand Up @@ -150,6 +153,7 @@ def __init__(
("grpc.max_receive_message_length", -1),
),
)
self._ssl_channel_credentials = ssl_credentials
else:
host = host if ":" in host else host + ":443"

Expand Down
Expand Up @@ -148,13 +148,16 @@ def __init__(
google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
and ``credentials_file`` are passed.
"""
self._ssl_channel_credentials = ssl_channel_credentials

if channel:
# Sanity check: Ensure that channel and credentials are not both
# provided.
credentials = False

# If a channel was explicitly provided, set it.
self._grpc_channel = channel
self._ssl_channel_credentials = None
elif api_mtls_endpoint:
warnings.warn(
"api_mtls_endpoint and client_cert_source are deprecated",
Expand Down Expand Up @@ -195,6 +198,7 @@ def __init__(
("grpc.max_receive_message_length", -1),
),
)
self._ssl_channel_credentials = ssl_credentials
else:
host = host if ":" in host else host + ":443"

Expand Down
1 change: 1 addition & 0 deletions scripts/fixup_bigquery_storage_v1_keywords.py
@@ -1,3 +1,4 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
Expand Down
6 changes: 3 additions & 3 deletions synth.metadata
Expand Up @@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-bigquery-storage.git",
"sha": "fbbb439b8c77fa9367a4b5bea725dd0b0f26b769"
"sha": "8115f88db7c355c96f7cff235406e744e7b08c67"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "c7331b75b0b7bbd614373b7d37085db1c80dd4be",
"internalRef": "338157137"
"sha": "07d41a7e5cade45aba6f0d277c89722b48f2c956",
"internalRef": "339292950"
}
},
{
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py
Expand Up @@ -1194,6 +1194,7 @@ def test_big_query_read_grpc_transport_channel():
)
assert transport.grpc_channel == channel
assert transport._host == "squid.clam.whelk:443"
assert transport._ssl_channel_credentials == None


def test_big_query_read_grpc_asyncio_transport_channel():
Expand All @@ -1205,6 +1206,7 @@ def test_big_query_read_grpc_asyncio_transport_channel():
)
assert transport.grpc_channel == channel
assert transport._host == "squid.clam.whelk:443"
assert transport._ssl_channel_credentials == None


@pytest.mark.parametrize(
Expand Down Expand Up @@ -1255,6 +1257,7 @@ def test_big_query_read_transport_channel_mtls_with_client_cert_source(transport
),
)
assert transport.grpc_channel == mock_grpc_channel
assert transport._ssl_channel_credentials == mock_ssl_cred


@pytest.mark.parametrize(
Expand Down

0 comments on commit e5fd4e6

Please sign in to comment.