Add missing type hints to synapse.http. (#11571)

This commit is contained in:
Patrick Cloke 2021-12-14 07:00:47 -05:00 committed by GitHub
parent ff6fd52160
commit 33abbc3278
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 76 additions and 51 deletions

View file

@ -31,6 +31,7 @@ from typing_extensions import Literal
from twisted.web.server import Request
from synapse.api.errors import Codes, SynapseError
from synapse.http.server import HttpServer
from synapse.types import JsonDict, RoomAlias, RoomID
from synapse.util import json_decoder
@ -726,7 +727,7 @@ class RestServlet:
into the appropriate HTTP response.
"""
def register(self, http_server):
def register(self, http_server: HttpServer) -> None:
"""Register this servlet with the given HTTP server."""
patterns = getattr(self, "PATTERNS", None)
if patterns: