Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/api/auth/backend/kerberos_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def decorated(*args, **kwargs):
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:
Expand Down
8 changes: 4 additions & 4 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -1528,16 +1528,16 @@ def rendered_templates(self, session):
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)
Expand Down