Skip to content

Commit

Permalink
fix: correct Client and Connection type annotations (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
tswast committed Nov 10, 2021
1 parent debb93a commit a427681
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions google/cloud/_http/__init__.py
Expand Up @@ -19,6 +19,7 @@
import json
import os
import platform
from typing import Optional
from urllib.parse import urlencode
import warnings

Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/client/__init__.py
Expand Up @@ -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.
Expand Down

0 comments on commit a427681

Please sign in to comment.