summary refs log tree commit diff
path: root/synapse/rest/client/register.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-09-01 11:59:32 -0400
committerGitHub <noreply@github.com>2021-09-01 11:59:32 -0400
commitd1f1b46c2cfe612790aebdd54765953951c94e45 (patch)
tree19b13d2d8b152ab7d3d05739c3124f2522aa85e1 /synapse/rest/client/register.py
parentPopulate `rooms.creator` field for easy lookup (#10697) (diff)
downloadsynapse-d1f1b46c2cfe612790aebdd54765953951c94e45.tar.xz
Additional type hints for client REST servlets (part 4) (#10728)
Diffstat (limited to 'synapse/rest/client/register.py')
-rw-r--r--synapse/rest/client/register.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/synapse/rest/client/register.py b/synapse/rest/client/register.py

index a28acd4041..8f3dd2a101 100644 --- a/synapse/rest/client/register.py +++ b/synapse/rest/client/register.py
@@ -375,11 +375,7 @@ class RegistrationTokenValidityRestServlet(RestServlet): unstable=True, ) - def __init__(self, hs): - """ - Args: - hs (synapse.server.HomeServer): server - """ + def __init__(self, hs: "HomeServer"): super().__init__() self.hs = hs self.store = hs.get_datastore() @@ -390,7 +386,7 @@ class RegistrationTokenValidityRestServlet(RestServlet): burst_count=hs.config.ratelimiting.rc_registration_token_validity.burst_count, ) - async def on_GET(self, request): + async def on_GET(self, request: Request) -> Tuple[int, JsonDict]: await self.ratelimiter.ratelimit(None, (request.getClientIP(),)) if not self.hs.config.enable_registration: @@ -730,7 +726,11 @@ class RegisterRestServlet(RestServlet): return 200, return_dict async def _do_appservice_registration( - self, username, as_token, body, should_issue_refresh_token: bool = False + self, + username: str, + as_token: str, + body: JsonDict, + should_issue_refresh_token: bool = False, ) -> JsonDict: user_id = await self.registration_handler.appservice_register( username, as_token