summary refs log tree commit diff
path: root/synapse/util/async_helpers.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-11-10 15:06:54 -0500
committerGitHub <noreply@github.com>2021-11-10 15:06:54 -0500
commit5cace20bf1f3c50ea50d56a938c4eee5825f4b84 (patch)
treeeb926831cf00aabe5c43a32dfae9256d83e4fb07 /synapse/util/async_helpers.py
parentAdd type hints to synapse._scripts (#11297) (diff)
downloadsynapse-5cace20bf1f3c50ea50d56a938c4eee5825f4b84.tar.xz
Add missing type hints to `synapse.app`. (#11287)
Diffstat (limited to 'synapse/util/async_helpers.py')
-rw-r--r--synapse/util/async_helpers.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/util/async_helpers.py b/synapse/util/async_helpers.py

index 96efc5f3e3..561b962e14 100644 --- a/synapse/util/async_helpers.py +++ b/synapse/util/async_helpers.py
@@ -31,13 +31,13 @@ from typing import ( Set, TypeVar, Union, + cast, ) import attr from typing_extensions import ContextManager from twisted.internet import defer -from twisted.internet.base import ReactorBase from twisted.internet.defer import CancelledError from twisted.internet.interfaces import IReactorTime from twisted.python import failure @@ -271,8 +271,7 @@ class Linearizer: if not clock: from twisted.internet import reactor - assert isinstance(reactor, ReactorBase) - clock = Clock(reactor) + clock = Clock(cast(IReactorTime, reactor)) self._clock = clock self.max_count = max_count