Add missing type hints to non-client REST servlets. (#10817)

Including admin, consent, key, synapse, and media. All REST servlets
(the synapse.rest module) now require typed method definitions.
This commit is contained in:
Patrick Cloke 2021-09-15 08:45:32 -04:00 committed by GitHub
parent 8c7a531e27
commit b93259082c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 169 additions and 96 deletions

View file

@ -57,7 +57,7 @@ class SendServerNoticeServlet(RestServlet):
self.admin_handler = hs.get_admin_handler()
self.txns = HttpTransactionCache(hs)
def register(self, json_resource: HttpServer):
def register(self, json_resource: HttpServer) -> None:
PATTERN = "/send_server_notice"
json_resource.register_paths(
"POST", admin_patterns(PATTERN + "$"), self.on_POST, self.__class__.__name__