diff --git a/sdks/python/apache_beam/internal/gcp/auth.py b/sdks/python/apache_beam/internal/gcp/auth.py index 31bc0b88b8ef..66c08b8344cb 100644 --- a/sdks/python/apache_beam/internal/gcp/auth.py +++ b/sdks/python/apache_beam/internal/gcp/auth.py @@ -66,7 +66,7 @@ def set_running_in_gce(worker_executing_project): def get_service_credentials(pipeline_options): - # type: (PipelineOptions) -> Optional[google.auth.credentials.Credentials] + # type: (PipelineOptions) -> Optional[_ApitoolsCredentialsAdapter] """For internal use only; no backwards-compatibility guarantees. @@ -76,7 +76,7 @@ def get_service_credentials(pipeline_options): like impersonated credentials. Returns: - A ``google.auth.credentials.Credentials`` object or None if credentials + A ``_ApitoolsCredentialsAdapter`` object or None if credentials not found. Returned object is thread-safe. """ return _Credentials.get_service_credentials(pipeline_options) diff --git a/sdks/python/apache_beam/internal/gcp/auth_test.py b/sdks/python/apache_beam/internal/gcp/auth_test.py index 98fb828875b9..654d8e815a50 100644 --- a/sdks/python/apache_beam/internal/gcp/auth_test.py +++ b/sdks/python/apache_beam/internal/gcp/auth_test.py @@ -26,7 +26,7 @@ try: import google.auth as gauth except ImportError: - gauth = None + gauth = None # type: ignore class MockLoggingHandler(logging.Handler):