From 8ccb15545c43ad83f27953b9ff08bc4875437153 Mon Sep 17 00:00:00 2001 From: Jack McCluskey <34928439+jrmccluskey@users.noreply.github.com> Date: Fri, 7 Jun 2024 10:53:49 -0400 Subject: [PATCH] Fix Python Linting Errors on Master (#31546) * Fix Linting Errors on Master * correct docstring --- sdks/python/apache_beam/internal/gcp/auth.py | 4 ++-- sdks/python/apache_beam/internal/gcp/auth_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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):