Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: show inheritance in types reference #91

Merged
merged 5 commits into from Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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