From 57b98a78104a9af60e6939c55f1dbc9ddf80f640 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:14:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- astronomer/providers/google/cloud/gke_utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/astronomer/providers/google/cloud/gke_utils.py b/astronomer/providers/google/cloud/gke_utils.py index 18cbd8e0a..1a9a15597 100644 --- a/astronomer/providers/google/cloud/gke_utils.py +++ b/astronomer/providers/google/cloud/gke_utils.py @@ -76,9 +76,11 @@ def _get_gke_config_file( # Write config to a temp file and set the environment variable to point to it. # This is to avoid race conditions of reading/writing a single file - with tempfile.NamedTemporaryFile() as conf_file, patch_environ( - {KUBE_CONFIG_ENV_VAR: conf_file.name} - ), hook.provide_authorized_gcloud(): + with ( + tempfile.NamedTemporaryFile() as conf_file, + patch_environ({KUBE_CONFIG_ENV_VAR: conf_file.name}), + hook.provide_authorized_gcloud(), + ): # Attempt to get/update credentials # We call gcloud directly instead of using google-cloud-python api # because there is no way to write kubernetes config to a file, which is