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) factory = build_sender_factory(hostname=smtphost if enable_tls else None)
reactor.connectTCP( reactor.connectTCP(
smtphost, # type: ignore[arg-type] smtphost,
smtpport, smtpport,
factory, factory,
timeout=30, timeout=30,

View File

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

View File

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