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

Commit

Permalink
Fix-up type errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Oct 31, 2023
1 parent 145b6b8 commit 10f8e5c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion synapse/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Clock:

_reactor: IReactorTime = attr.ib()

@defer.inlineCallbacks # type: ignore[arg-type] # Issue in Twisted's type annotations
@defer.inlineCallbacks
def sleep(self, seconds: float) -> "Generator[Deferred[float], Any, Any]":
d: defer.Deferred[float] = defer.Deferred()
with context.PreserveLoggingContext():
Expand Down
2 changes: 1 addition & 1 deletion tests/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def wrap_server_factory_for_tls(
)
else:
return TLSMemoryBIOFactory(
connection_creator, isClient=False, wrappedFactory=factory, clock=clock # type: ignore[call-arg]
connection_creator, isClient=False, wrappedFactory=factory, clock=clock
)


Expand Down
2 changes: 1 addition & 1 deletion tests/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def getHostByName(
if twisted.version > Version("Twisted", 23, 8, 0):
from twisted.protocols import tls

tls._get_default_clock = lambda: self # type: ignore[attr-defined]
tls._get_default_clock = lambda: self

self.nameResolver = SimpleResolverComplexifier(FakeResolver())
super().__init__()
Expand Down

0 comments on commit 10f8e5c

Please sign in to comment.