From 5cdf172c9078cff44c972ef5fd8b98222463f652 Mon Sep 17 00:00:00 2001 From: Sara Vallero Date: Thu, 18 Jan 2024 15:41:06 +0100 Subject: [PATCH] Reformat --- kubernetes_airflow_dag_example.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/kubernetes_airflow_dag_example.py b/kubernetes_airflow_dag_example.py index 18341fa..1388b5a 100644 --- a/kubernetes_airflow_dag_example.py +++ b/kubernetes_airflow_dag_example.py @@ -30,14 +30,20 @@ log = logging.getLogger(__name__) -worker_container_repository = conf.get("kubernetes_executor", "worker_container_repository") +worker_container_repository = conf.get( + "kubernetes_executor", "worker_container_repository" +) worker_container_tag = conf.get("kubernetes_executor", "worker_container_tag") try: from kubernetes.client import models as k8s except ImportError: - log.warning("Could not import DAGs in example_local_kubernetes_executor.py", exc_info=True) - log.warning("Install Kubernetes dependencies with: pip install apache-airflow[cncf.kubernetes]") + log.warning( + "Could not import DAGs in example_local_kubernetes_executor.py", exc_info=True + ) + log.warning( + "Install Kubernetes dependencies with: pip install apache-airflow[cncf.kubernetes]" + ) k8s = None if k8s: @@ -50,7 +56,9 @@ ) as dag: # You can use annotations on your kubernetes pods! start_task_executor_config = { - "pod_override": k8s.V1Pod(metadata=k8s.V1ObjectMeta(annotations={"test": "annotation"})) + "pod_override": k8s.V1Pod( + metadata=k8s.V1ObjectMeta(annotations={"test": "annotation"}) + ) } @task(