From 6f48143f4c60c555b3f571007cdc929ce90920b1 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Thu, 23 Sep 2021 11:51:04 +1000 Subject: Apply pyupgrade --py36-plus. This removes some 'u' prefixes and converts simple format() calls to f-strings. --- mediagoblin/oauth/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mediagoblin/oauth/views.py') 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 -- cgit v1.2.3