mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
python: Convert percent formatting to Python 3.6 f-strings.
Generated by pyupgrade --py36-plus. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
6480deaf27
commit
67e7a3631d
@@ -92,9 +92,9 @@ def get_gravatar_url(email: str, avatar_version: int, medium: bool=False) -> str
|
||||
|
||||
def _get_unversioned_gravatar_url(email: str, medium: bool) -> str:
|
||||
if settings.ENABLE_GRAVATAR:
|
||||
gravitar_query_suffix = "&s=%s" % (MEDIUM_AVATAR_SIZE,) if medium else ""
|
||||
gravitar_query_suffix = f"&s={MEDIUM_AVATAR_SIZE}" if medium else ""
|
||||
hash_key = gravatar_hash(email)
|
||||
return "https://secure.gravatar.com/avatar/%s?d=identicon%s" % (hash_key, gravitar_query_suffix)
|
||||
return f"https://secure.gravatar.com/avatar/{hash_key}?d=identicon{gravitar_query_suffix}"
|
||||
return settings.DEFAULT_AVATAR_URI+'?x=x'
|
||||
|
||||
def _get_unversioned_avatar_url(user_profile_id: int,
|
||||
|
||||
Reference in New Issue
Block a user