summary refs log tree commit diff
path: root/synapse/rest/admin/users.py
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2021-06-07 16:12:34 +0200
committerGitHub <noreply@github.com>2021-06-07 15:12:34 +0100
commitd558292548178dde785462bbca7f84c06c1e9eda (patch)
tree77f5c08fa6b99e2c05b2526a2dbaa65ffa5407cb /synapse/rest/admin/users.py
parentDelete completes to-device messages earlier in /sync (#10124) (diff)
downloadsynapse-d558292548178dde785462bbca7f84c06c1e9eda.tar.xz
Add missing type hints to the admin API servlets (#10105)
Diffstat (limited to '')
-rw-r--r--synapse/rest/admin/users.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index 8c9d21d3ea..7d75564758 100644
--- a/synapse/rest/admin/users.py
+++ b/synapse/rest/admin/users.py
@@ -478,13 +478,12 @@ class UserRegisterServlet(RestServlet):
 
 class WhoisRestServlet(RestServlet):
     path_regex = "/whois/(?P<user_id>[^/]*)$"
-    PATTERNS = (
-        admin_patterns(path_regex)
-        +
+    PATTERNS = [
+        *admin_patterns(path_regex),
         # URL for spec reason
         # https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-admin-whois-userid
-        client_patterns("/admin" + path_regex, v1=True)
-    )
+        *client_patterns("/admin" + path_regex, v1=True),
+    ]
 
     def __init__(self, hs: "HomeServer"):
         self.hs = hs
@@ -553,11 +552,7 @@ class DeactivateAccountRestServlet(RestServlet):
 class AccountValidityRenewServlet(RestServlet):
     PATTERNS = admin_patterns("/account_validity/validity$")
 
-    def __init__(self, hs):
-        """
-        Args:
-            hs (synapse.server.HomeServer): server
-        """
+    def __init__(self, hs: "HomeServer"):
         self.hs = hs
         self.account_activity_handler = hs.get_account_validity_handler()
         self.auth = hs.get_auth()