Content-Length: 327753 | pFad | https://www.github.com/googleapis/python-cloud-core/commit/a427681913ab76379e007a8c3ae519b41e8cee62

CD1 fix: correct Client and Connection type annotations (#156) · googleapis/python-cloud-core@a427681 · GitHub
Skip to content

Commit a427681

Browse files
authored
fix: correct Client and Connection type annotations (#156)
1 parent debb93a commit a427681

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

google/cloud/_http/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import json
2020
import os
2121
import platform
22+
from typing import Optional
2223
from urllib.parse import urlencode
2324
import warnings
2425

@@ -168,19 +169,19 @@ class JSONConnection(Connection):
168169
must be updated by subclasses.
169170
"""
170171

171-
API_BASE_URL = None
172+
API_BASE_URL: Optional[str] = None
172173
"""The base of the API call URL."""
173174

174-
API_BASE_MTLS_URL = None
175+
API_BASE_MTLS_URL: Optional[str] = None
175176
"""The base of the API call URL for mutual TLS."""
176177

177178
ALLOW_AUTO_SWITCH_TO_MTLS_URL = False
178179
"""Indicates if auto switch to mTLS url is allowed."""
179180

180-
API_VERSION = None
181+
API_VERSION: Optional[str] = None
181182
"""The version of the API, used in building the API call's URL."""
182183

183-
API_URL_TEMPLATE = None
184+
API_URL_TEMPLATE: Optional[str] = None
184185
"""A template for the URL of a particular API call."""
185186

186187
def get_api_base_url_for_mtls(self, api_base_url=None):

google/cloud/client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class Client(_ClientFactoryMixin):
144144
to acquire default credentials.
145145
"""
146146

147-
SCOPE: Union[Tuple[str], None] = None
147+
SCOPE: Union[Tuple[str, ...], None] = None
148148
"""The scopes required for authenticating with a service.
149149
150150
Needs to be set by subclasses.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://www.github.com/googleapis/python-cloud-core/commit/a427681913ab76379e007a8c3ae519b41e8cee62

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy