fix: add type annotation to approved_scopes for type checker

This commit is contained in:
Johan Lundberg 2026-02-19 11:16:01 +01:00
parent b8464284c2
commit 3b1c145e31
No known key found for this signature in database
GPG key ID: A6C152738D03C7D1

View file

@ -340,7 +340,7 @@ async def consent_submit(request: Request) -> Response:
return HTMLResponse("<h1>Error</h1><p>Invalid action</p>", status_code=400)
# Allow — collect approved scopes
approved_scopes = form.getlist("scope")
approved_scopes: list[str] = [str(s) for s in form.getlist("scope")]
if "openid" not in approved_scopes:
approved_scopes = ["openid", *list(approved_scopes)]