Use literal string interpolation in integrations H-J (f-strings) (#26380)

This commit is contained in:
Franck Nijhof authored and Pascal Vizeli committed 2019-09-03 17:27:14 +02:00
1 parent 13bb2ea35a
commit f9edec19ad
59 files changed
+128 -139

No files matched your search

+2 -2
View File
@@ -570,8 +570,8 @@ def create_vapid_headers(vapid_email, subscription_info, vapid_private_key):
if vapid_email and vapid_private_key and ATTR_ENDPOINT in subscription_info:
url = urlparse(subscription_info.get(ATTR_ENDPOINT))
vapid_claims = {
"sub": "mailto:{}".format(vapid_email),
"aud": "{}://{}".format(url.scheme, url.netloc),
"sub": f"mailto:{vapid_email}",
"aud": f"{url.scheme}://{url.netloc}",
}
vapid = Vapid.from_string(private_key=vapid_private_key)
return vapid.sign(vapid_claims)