Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 30, 2024
1 parent fe4e8cb commit c447e43
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions astronomer/providers/google/cloud/gke_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(): # fmt: off
with (
tempfile.NamedTemporaryFile() as conf_file,
patch_environ({KUBE_CONFIG_ENV_VAR: conf_file.name}),
hook.provide_authorized_gcloud(),
): # fmt: off
# 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
Expand Down

0 comments on commit c447e43

Please sign in to comment.