mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 15:05:05 -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
|
@ -14,7 +14,7 @@
|
|||
import contextlib
|
||||
import logging
|
||||
import time
|
||||
from typing import Generator, Optional, Tuple, Union
|
||||
from typing import Any, Generator, Optional, Tuple, Union
|
||||
|
||||
import attr
|
||||
from zope.interface import implementer
|
||||
|
@ -66,9 +66,9 @@ class SynapseRequest(Request):
|
|||
self,
|
||||
channel: HTTPChannel,
|
||||
site: "SynapseSite",
|
||||
*args,
|
||||
*args: Any,
|
||||
max_request_body_size: int = 1024,
|
||||
**kw,
|
||||
**kw: Any,
|
||||
):
|
||||
super().__init__(channel, *args, **kw)
|
||||
self._max_request_body_size = max_request_body_size
|
||||
|
@ -557,7 +557,7 @@ class SynapseSite(Site):
|
|||
proxied = config.http_options.x_forwarded
|
||||
request_class = XForwardedForRequest if proxied else SynapseRequest
|
||||
|
||||
def request_factory(channel, queued: bool) -> Request:
|
||||
def request_factory(channel: HTTPChannel, queued: bool) -> Request:
|
||||
return request_class(
|
||||
channel,
|
||||
self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue