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

Commit

Permalink
Remove unnecessary ignores due to Twisted upgrade. (#11939)
Browse files Browse the repository at this point in the history
Twisted 22.1.0 fixed some internal type hints, allowing Synapse
to remove ignore calls for parameters to connectTCP.
  • Loading branch information
clokep authored Feb 8, 2022
1 parent 6b91315 commit 6c0984e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/11939.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove an unnecessary ignoring of type hints due to fixes in upstream packages.
2 changes: 1 addition & 1 deletion synapse/handlers/send_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def build_sender_factory(**kwargs: Any) -> ESMTPSenderFactory:
factory = build_sender_factory(hostname=smtphost if enable_tls else None)

reactor.connectTCP(
smtphost, # type: ignore[arg-type]
smtphost,
smtpport,
factory,
timeout=30,
Expand Down
4 changes: 2 additions & 2 deletions synapse/replication/tcp/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def start_replication(self, hs: "HomeServer"):
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,
Expand All @@ -330,7 +330,7 @@ def start_replication(self, hs: "HomeServer"):
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,
Expand Down
2 changes: 1 addition & 1 deletion synapse/replication/tcp/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def lazyConnection(

reactor = hs.get_reactor()
reactor.connectTCP(
host, # type: ignore[arg-type]
host,
port,
factory,
timeout=30,
Expand Down

0 comments on commit 6c0984e

Please sign in to comment.