Use inline type hints in handlers/ and rest/. (#10382)

This commit is contained in:
Jonathan de Jong 2021-07-16 19:22:36 +02:00 committed by GitHub
parent 36dc15412d
commit 98aec1cc9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 212 additions and 215 deletions

View file

@ -118,9 +118,9 @@ class AccountDetailsResource(DirectServeHtmlResource):
use_display_name = parse_boolean(request, "use_display_name", default=False)
try:
emails_to_use = [
emails_to_use: List[str] = [
val.decode("utf-8") for val in request.args.get(b"use_email", [])
] # type: List[str]
]
except ValueError:
raise SynapseError(400, "Query parameter use_email must be utf-8")
except SynapseError as e: