Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Preston Marshall committed Aug 1, 2020
1 parent bba300d commit bef1313
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/bigquery/dbt/adapters/bigquery/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,19 @@ def get_bigquery_credentials(cls, profile_credentials):

@classmethod
def get_impersonated_bigquery_credentials(cls, profile_credentials):
account_to_impersonate = profile_credentials.impersonate_service_account
source_credentials = cls.get_bigquery_credentials(profile_credentials)
return impersonated_credentials.Credentials(
source_credentials=source_credentials,
target_principal=account_to_impersonate,
target_principal=profile_credentials.impersonate_service_account,
target_scopes=list(cls.SCOPE),
lifetime=profile_credentials.timeout_seconds,
)

@classmethod
def get_bigquery_client(cls, profile_credentials):
if profile_credentials.impersonate_service_account:
creds = cls.get_impersonated_bigquery_credentials(profile_credentials)
creds =\
cls.get_impersonated_bigquery_credentials(profile_credentials)
else:
creds = cls.get_bigquery_credentials(profile_credentials)
database = profile_credentials.database
Expand Down

0 comments on commit bef1313

Please sign in to comment.