Remove unnecessary ignores due to Twisted upgrade. (#11939)

Twisted 22.1.0 fixed some internal type hints, allowing Synapse
to remove ignore calls for parameters to connectTCP.
This commit is contained in:
Patrick Cloke 2022-02-08 09:15:59 -05:00 committed by GitHub
parent 6b91315ddf
commit 6c0984e3f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

1
changelog.d/11939.misc Normal file
View file

@ -0,0 +1 @@
Remove an unnecessary ignoring of type hints due to fixes in upstream packages.

View file

@ -106,7 +106,7 @@ async def _sendmail(
factory = build_sender_factory(hostname=smtphost if enable_tls else None)
reactor.connectTCP(
smtphost, # type: ignore[arg-type]
smtphost,
smtpport,
factory,
timeout=30,

View file

@ -318,7 +318,7 @@ class ReplicationCommandHandler:
hs, outbound_redis_connection
)
hs.get_reactor().connectTCP(
hs.config.redis.redis_host, # type: ignore[arg-type]
hs.config.redis.redis_host,
hs.config.redis.redis_port,
self._factory,
timeout=30,
@ -330,7 +330,7 @@ class ReplicationCommandHandler:
host = hs.config.worker.worker_replication_host
port = hs.config.worker.worker_replication_port
hs.get_reactor().connectTCP(
host, # type: ignore[arg-type]
host,
port,
self._factory,
timeout=30,

View file

@ -373,7 +373,7 @@ def lazyConnection(
reactor = hs.get_reactor()
reactor.connectTCP(
host, # type: ignore[arg-type]
host,
port,
factory,
timeout=30,