mik-laj commented on a change in pull request #12091:
URL: https://github.com/apache/airflow/pull/12091#discussion_r517402706



##########
File path: airflow/providers/google/common/hooks/base_google.py
##########
@@ -432,20 +432,24 @@ def provide_authorized_gcloud(self):
         credentials_path = 
_cloud_sdk.get_application_default_credentials_path()
         project_id = self.project_id
 
-        # fmt: off
-        with self.provide_gcp_credential_file_as_context(), \
-                tempfile.TemporaryDirectory() as gcloud_config_tmp, \
-                patch_environ({'CLOUDSDK_CONFIG': gcloud_config_tmp}):
+        with ExitStack() as exit_stack:
+            
exit_stack.enter_context(self.provide_gcp_credential_file_as_context())

Review comment:
       This piece of code couldn't handle black, so I wrote it a bit 
differently.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to