Add a return type to parse_string. (#10438)

And set the required attribute in a few places which will error if
a parameter is not provided.
This commit is contained in:
Patrick Cloke 2021-07-21 09:47:56 -04:00 committed by GitHub
parent 2d89c66b88
commit 5db118626b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 86 additions and 45 deletions

View file

@ -112,7 +112,7 @@ class ConsentResource(DirectServeHtmlResource):
request (twisted.web.http.Request):
"""
version = parse_string(request, "v", default=self._default_consent_version)
username = parse_string(request, "u", required=False, default="")
username = parse_string(request, "u", default="")
userhmac = None
has_consented = False
public_version = username == ""