Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 6c0984e

Browse files
authored
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.
1 parent 6b91315 commit 6c0984e

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

changelog.d/11939.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove an unnecessary ignoring of type hints due to fixes in upstream packages.

synapse/handlers/send_email.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def build_sender_factory(**kwargs: Any) -> ESMTPSenderFactory:
106106
factory = build_sender_factory(hostname=smtphost if enable_tls else None)
107107

108108
reactor.connectTCP(
109-
smtphost, # type: ignore[arg-type]
109+
smtphost,
110110
smtpport,
111111
factory,
112112
timeout=30,

synapse/replication/tcp/handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def start_replication(self, hs: "HomeServer"):
318318
hs, outbound_redis_connection
319319
)
320320
hs.get_reactor().connectTCP(
321-
hs.config.redis.redis_host, # type: ignore[arg-type]
321+
hs.config.redis.redis_host,
322322
hs.config.redis.redis_port,
323323
self._factory,
324324
timeout=30,
@@ -330,7 +330,7 @@ def start_replication(self, hs: "HomeServer"):
330330
host = hs.config.worker.worker_replication_host
331331
port = hs.config.worker.worker_replication_port
332332
hs.get_reactor().connectTCP(
333-
host, # type: ignore[arg-type]
333+
host,
334334
port,
335335
self._factory,
336336
timeout=30,

synapse/replication/tcp/redis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def lazyConnection(
373373

374374
reactor = hs.get_reactor()
375375
reactor.connectTCP(
376-
host, # type: ignore[arg-type]
376+
host,
377377
port,
378378
factory,
379379
timeout=30,

0 commit comments

Comments
 (0)