Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfeng-db committed Nov 8, 2023
1 parent 96b65fa commit 677f9d8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions databricks/sdk/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import google
import google.auth
import google.auth.transport.requests.Request
import requests
import requests.auth
from google.auth import impersonated_credentials
Expand Down Expand Up @@ -280,7 +279,7 @@ def google_credentials(cfg: 'Config') -> Optional[HeaderFactory]:
credentials = service_account.IDTokenCredentials.from_service_account_file(
filename=cfg.google_credentials, target_audience=cfg.host)

request = Request()
request = google.auth.transport.requests.Request()

gcp_credentials = service_account.IDTokenCredentials.from_service_account_file(
filename=cfg.google_credentials, scopes=GcpScopes)
Expand Down Expand Up @@ -316,7 +315,7 @@ def google_id(cfg: 'Config') -> Optional[HeaderFactory]:
gcp_impersonated_credentials = impersonated_credentials.Credentials(
source_credentials=credentials, target_principal=cfg.google_service_account, target_scopes=GcpScopes)

request = Request()
request = google.auth.transport.requests.Request()

def refreshed_headers() -> Dict[str, str]:
token = id_creds.refresh(request)
Expand Down

0 comments on commit 677f9d8

Please sign in to comment.