python: Convert more "".format to Python 3.6 f-strings.

Generated by pyupgrade --py36-plus --keep-percent-format, with more
restrictions patched out.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-06-09 21:40:53 -07:00
committed by Tim Abbott
parent 7b2255597c
commit 6480deaf27
27 changed files with 60 additions and 156 deletions

View File

@@ -1198,10 +1198,7 @@ def social_associate_user_helper(backend: BaseAuth, return_data: Dict[str, Any],
# In SAML authentication, the IdP may support only sending
# the first and last name as separate attributes - in that case
# we construct the full name from them.
return_data["full_name"] = "{} {}".format(
first_name,
last_name
).strip() # strip removes the unnecessary ' '
return_data["full_name"] = f"{first_name} {last_name}".strip() # strip removes the unnecessary ' '
return user_profile