mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 02:54:49 -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
|
@ -117,7 +117,7 @@ class ConsentResource(DirectServeHtmlResource):
|
|||
has_consented = False
|
||||
public_version = username == ""
|
||||
if not public_version:
|
||||
args = request.args # type: Dict[bytes, List[bytes]]
|
||||
args: Dict[bytes, List[bytes]] = request.args
|
||||
userhmac_bytes = parse_bytes_from_args(args, "h", required=True)
|
||||
|
||||
self._check_hash(username, userhmac_bytes)
|
||||
|
@ -154,7 +154,7 @@ class ConsentResource(DirectServeHtmlResource):
|
|||
"""
|
||||
version = parse_string(request, "v", required=True)
|
||||
username = parse_string(request, "u", required=True)
|
||||
args = request.args # type: Dict[bytes, List[bytes]]
|
||||
args: Dict[bytes, List[bytes]] = request.args
|
||||
userhmac = parse_bytes_from_args(args, "h", required=True)
|
||||
|
||||
self._check_hash(username, userhmac)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue