From a427681913ab76379e007a8c3ae519b41e8cee62 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Wed, 10 Nov 2021 10:03:09 -0600 Subject: [PATCH 1/2] fix: correct Client and Connection type annotations (#156) --- google/cloud/_http/__init__.py | 9 +++++---- google/cloud/client/__init__.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/google/cloud/_http/__init__.py b/google/cloud/_http/__init__.py index 7c9cbc9..4c3ed96 100644 --- a/google/cloud/_http/__init__.py +++ b/google/cloud/_http/__init__.py @@ -19,6 +19,7 @@ import json import os import platform +from typing import Optional from urllib.parse import urlencode import warnings @@ -168,19 +169,19 @@ class JSONConnection(Connection): must be updated by subclasses. """ - API_BASE_URL = None + API_BASE_URL: Optional[str] = None """The base of the API call URL.""" - API_BASE_MTLS_URL = None + API_BASE_MTLS_URL: Optional[str] = None """The base of the API call URL for mutual TLS.""" ALLOW_AUTO_SWITCH_TO_MTLS_URL = False """Indicates if auto switch to mTLS url is allowed.""" - API_VERSION = None + API_VERSION: Optional[str] = None """The version of the API, used in building the API call's URL.""" - API_URL_TEMPLATE = None + API_URL_TEMPLATE: Optional[str] = None """A template for the URL of a particular API call.""" def get_api_base_url_for_mtls(self, api_base_url=None): diff --git a/google/cloud/client/__init__.py b/google/cloud/client/__init__.py index b3ca4b8..5bd12f2 100644 --- a/google/cloud/client/__init__.py +++ b/google/cloud/client/__init__.py @@ -144,7 +144,7 @@ class Client(_ClientFactoryMixin): to acquire default credentials. """ - SCOPE: Union[Tuple[str], None] = None + SCOPE: Union[Tuple[str, ...], None] = None """The scopes required for authenticating with a service. Needs to be set by subclasses. From a4290ece2cd86d552892fe84c50149a2773e03e4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 16:10:23 +0000 Subject: [PATCH 2/2] chore: release 2.2.1 (#157) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.1](https://www.github.com/googleapis/python-cloud-core/compare/v2.2.0...v2.2.1) (2021-11-10) ### Bug Fixes * correct Client and Connection type annotations ([#156](https://www.github.com/googleapis/python-cloud-core/issues/156)) ([a427681](https://www.github.com/googleapis/python-cloud-core/commit/a427681913ab76379e007a8c3ae519b41e8cee62)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google/cloud/version.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01e2c7d..144dfcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-core/#history +### [2.2.1](https://www.github.com/googleapis/python-cloud-core/compare/v2.2.0...v2.2.1) (2021-11-10) + + +### Bug Fixes + +* correct Client and Connection type annotations ([#156](https://www.github.com/googleapis/python-cloud-core/issues/156)) ([a427681](https://www.github.com/googleapis/python-cloud-core/commit/a427681913ab76379e007a8c3ae519b41e8cee62)) + ## [2.2.0](https://www.github.com/googleapis/python-cloud-core/compare/v2.1.0...v2.2.0) (2021-11-09) diff --git a/google/cloud/version.py b/google/cloud/version.py index bd0f8e5..b1be7d8 100644 --- a/google/cloud/version.py +++ b/google/cloud/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.2.0" +__version__ = "2.2.1"