mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-06 09:44:11 -04:00
Use inline type hints in handlers/
and rest/
. (#10382)
This commit is contained in:
parent
36dc15412d
commit
98aec1cc9d
43 changed files with 212 additions and 215 deletions
|
@ -197,7 +197,7 @@ class ProfileHandler(BaseHandler):
|
|||
400, "Displayname is too long (max %i)" % (MAX_DISPLAYNAME_LEN,)
|
||||
)
|
||||
|
||||
displayname_to_set = new_displayname # type: Optional[str]
|
||||
displayname_to_set: Optional[str] = new_displayname
|
||||
if new_displayname == "":
|
||||
displayname_to_set = None
|
||||
|
||||
|
@ -286,7 +286,7 @@ class ProfileHandler(BaseHandler):
|
|||
400, "Avatar URL is too long (max %i)" % (MAX_AVATAR_URL_LEN,)
|
||||
)
|
||||
|
||||
avatar_url_to_set = new_avatar_url # type: Optional[str]
|
||||
avatar_url_to_set: Optional[str] = new_avatar_url
|
||||
if new_avatar_url == "":
|
||||
avatar_url_to_set = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue