mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-18 06:19:17 -04:00
Adds misc missing type hints (#11953)
This commit is contained in:
parent
c3db7a0b59
commit
a121507cfe
9 changed files with 48 additions and 41 deletions
|
@ -322,21 +322,20 @@ class SimpleHttpClient:
|
|||
self._ip_whitelist = ip_whitelist
|
||||
self._ip_blacklist = ip_blacklist
|
||||
self._extra_treq_args = treq_args or {}
|
||||
|
||||
self.user_agent = hs.version_string
|
||||
self.clock = hs.get_clock()
|
||||
|
||||
user_agent = hs.version_string
|
||||
if hs.config.server.user_agent_suffix:
|
||||
self.user_agent = "%s %s" % (
|
||||
self.user_agent,
|
||||
user_agent = "%s %s" % (
|
||||
user_agent,
|
||||
hs.config.server.user_agent_suffix,
|
||||
)
|
||||
self.user_agent = user_agent.encode("ascii")
|
||||
|
||||
# We use this for our body producers to ensure that they use the correct
|
||||
# reactor.
|
||||
self._cooperator = Cooperator(scheduler=_make_scheduler(hs.get_reactor()))
|
||||
|
||||
self.user_agent = self.user_agent.encode("ascii")
|
||||
|
||||
if self._ip_blacklist:
|
||||
# If we have an IP blacklist, we need to use a DNS resolver which
|
||||
# filters out blacklisted IP addresses, to prevent DNS rebinding.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue