mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
mypy: Use Python 3 type syntax in zerver/lib/avatar.py.
This commit is contained in:
@@ -39,14 +39,13 @@ def avatar_url_from_dict(userdict: Dict[str, Any], medium: bool=False) -> Text:
|
|||||||
url += '&version=%d' % (userdict['avatar_version'],)
|
url += '&version=%d' % (userdict['avatar_version'],)
|
||||||
return url
|
return url
|
||||||
|
|
||||||
def get_avatar_field(user_id,
|
def get_avatar_field(user_id: int,
|
||||||
realm_id,
|
realm_id: int,
|
||||||
email,
|
email: Text,
|
||||||
avatar_source,
|
avatar_source: Text,
|
||||||
avatar_version,
|
avatar_version: int,
|
||||||
medium,
|
medium: bool,
|
||||||
client_gravatar):
|
client_gravatar: bool) -> Optional[Text]:
|
||||||
# type: (int, int, Text, Text, int, bool, bool) -> Optional[Text]
|
|
||||||
'''
|
'''
|
||||||
Most of the parameters to this function map to fields
|
Most of the parameters to this function map to fields
|
||||||
by the same name in UserProfile (avatar_source, realm_id,
|
by the same name in UserProfile (avatar_source, realm_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user