ruff: Fix UP032 Use f-string instead of format call.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 50e6cba1af)
This commit is contained in:
Anders Kaseorg
2023-07-19 14:06:38 -07:00
committed by Alex Vandiver
parent 2e9544a9a5
commit 8fdcadb08a
7 changed files with 11 additions and 29 deletions

View File

@@ -27,8 +27,8 @@ link_regex = re.compile(
# Use Chrome User-Agent, since some sites refuse to work on old browsers
ZULIP_URL_PREVIEW_USER_AGENT = (
"Mozilla/5.0 (compatible; ZulipURLPreview/{version}; +{external_host})"
).format(version=ZULIP_VERSION, external_host=settings.ROOT_DOMAIN_URI)
f"Mozilla/5.0 (compatible; ZulipURLPreview/{ZULIP_VERSION}; +{settings.ROOT_DOMAIN_URI})"
)
# FIXME: This header and timeout are not used by pyoembed, when trying to autodiscover!
HEADERS = {"User-Agent": ZULIP_URL_PREVIEW_USER_AGENT}