This is an automated email from the ASF dual-hosted git repository.

husseinawala pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new b7191b8d0a Remove useless string join from core (#33969)
b7191b8d0a is described below

commit b7191b8d0adae87f72bb6d1a038fb7937b6a80ae
Author: Hussein Awala <[email protected]>
AuthorDate: Fri Sep 1 08:44:07 2023 +0200

    Remove useless string join from core (#33969)
---
 airflow/api/auth/backend/kerberos_auth.py | 2 +-
 airflow/www/views.py                      | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/airflow/api/auth/backend/kerberos_auth.py 
b/airflow/api/auth/backend/kerberos_auth.py
index 5306ca6d1e..e5458d0552 100644
--- a/airflow/api/auth/backend/kerberos_auth.py
+++ b/airflow/api/auth/backend/kerberos_auth.py
@@ -144,7 +144,7 @@ def requires_authentication(function: T):
                 response = function(*args, **kwargs)
                 response = make_response(response)
                 if ctx.kerberos_token is not None:
-                    response.headers["WWW-Authenticate"] = " 
".join(["negotiate", ctx.kerberos_token])
+                    response.headers["WWW-Authenticate"] = f"negotiate 
{ctx.kerberos_token}"
 
                 return response
             if return_code != kerberos.AUTH_GSS_CONTINUE:
diff --git a/airflow/www/views.py b/airflow/www/views.py
index add041c51d..d3ecae5044 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -561,7 +561,7 @@ def get_key_paths(input_dict):
     for key, value in input_dict.items():
         if isinstance(value, dict):
             for sub_key in get_key_paths(value):
-                yield ".".join((key, sub_key))
+                yield f"{key}.{sub_key}"
         else:
             yield key
 
@@ -1528,16 +1528,16 @@ class Airflow(AirflowBaseView):
                     for key, value in content.items():
                         renderer = task.template_fields_renderers.get(key, key)
                         if renderer in renderers:
-                            html_dict[".".join([template_field, key])] = (
+                            html_dict[f"{template_field}.{key}"] = (
                                 renderers[renderer](value) if not no_dagrun 
else ""
                             )
                         else:
-                            html_dict[".".join([template_field, key])] = 
Markup(
+                            html_dict[f"{template_field}.{key}"] = Markup(
                                 "<pre><code>{}</pre></code>"
                             ).format(pformat(value) if not no_dagrun else "")
                 else:
                     for dict_keys in get_key_paths(content):
-                        template_path = ".".join((template_field, dict_keys))
+                        template_path = f"{template_field}.{dict_keys}"
                         renderer = 
task.template_fields_renderers.get(template_path, template_path)
                         if renderer in renderers:
                             content_value = get_value_from_path(dict_keys, 
content)

Reply via email to