diff --git a/airbyte-integrations/connectors/source-google-directory/source_google_directory/api.py b/airbyte-integrations/connectors/source-google-directory/source_google_directory/api.py index c56a492ee5e0..f3a5ba0ab415 100644 --- a/airbyte-integrations/connectors/source-google-directory/source_google_directory/api.py +++ b/airbyte-integrations/connectors/source-google-directory/source_google_directory/api.py @@ -12,7 +12,7 @@ from google.auth.transport.requests import Request from google.oauth2 import service_account from google.oauth2.credentials import Credentials -from googleapiclient.discovery import Resource, build +from googleapiclient.discovery import build from googleapiclient.errors import HttpError as GoogleApiHttpError from .utils import rate_limit_handling @@ -57,15 +57,15 @@ def _obtain_creds(self): elif "client_id" and "client_secret" in self._raw_credentials: self._obtain_web_app_creds() - def _construct_resource(self) -> Resource: + def _construct_resource(self): if not self._creds: self._obtain_creds() if not self._service: self._service = build("admin", "directory_v1", credentials=self._creds) def _get_resource(self, name: str): - service = self._construct_resource() - return getattr(service, name) + self._construct_resource() + return getattr(self._service, name) @backoff.on_exception(backoff.expo, GoogleApiHttpError, max_tries=7, giveup=rate_limit_handling) def get(self, name: str, params: Dict = None) -> Dict: