diff options
author | Ben Sturmfels <ben@sturm.com.au> | 2021-09-23 11:51:04 +1000 |
---|---|---|
committer | Ben Sturmfels <ben@sturm.com.au> | 2021-09-23 11:51:04 +1000 |
commit | 6f48143f4c60c555b3f571007cdc929ce90920b1 (patch) | |
tree | 2a2333a365379d4c4c42faf79bcd9db20aaa8626 /mediagoblin/oauth | |
parent | f90707e22c0380bd0f17e2e724e58ecf91abd5a3 (diff) | |
download | mediagoblin-6f48143f4c60c555b3f571007cdc929ce90920b1.tar.lz mediagoblin-6f48143f4c60c555b3f571007cdc929ce90920b1.tar.xz mediagoblin-6f48143f4c60c555b3f571007cdc929ce90920b1.zip |
Apply pyupgrade --py36-plus.
This removes some 'u' prefixes and converts simple format() calls to f-strings.
Diffstat (limited to 'mediagoblin/oauth')
-rw-r--r-- | mediagoblin/oauth/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/oauth/views.py b/mediagoblin/oauth/views.py index 41652172..b9e014f8 100644 --- a/mediagoblin/oauth/views.py +++ b/mediagoblin/oauth/views.py @@ -126,7 +126,7 @@ def client_register(request): logo_uri = data.get("logo_uri", client.logo_url) if logo_uri is not None and not validate_url(logo_uri): - error = "Logo URI {} is not a valid URI.".format(logo_uri) + error = f"Logo URI {logo_uri} is not a valid URI." return json_response( {"error": error}, status=400 @@ -146,7 +146,7 @@ def client_register(request): for contact in contacts: if not validate_email(contact): # not a valid email - error = "Email {} is not a valid email.".format(contact) + error = f"Email {contact} is not a valid email." return json_response({"error": error}, status=400) @@ -163,7 +163,7 @@ def client_register(request): for uri in redirect_uris: if not validate_url(uri): # not a valid uri - error = "URI {} is not a valid URI".format(uri) + error = f"URI {uri} is not a valid URI" return json_response({"error": error}, status=400) client.redirect_uri = redirect_uris |