mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-28 15:52:12 -04:00
Add missing type hints to synapse.http. (#11571)
This commit is contained in:
parent
ff6fd52160
commit
33abbc3278
8 changed files with 76 additions and 51 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue