diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-11-10 15:06:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 15:06:54 -0500 |
commit | 5cace20bf1f3c50ea50d56a938c4eee5825f4b84 (patch) | |
tree | eb926831cf00aabe5c43a32dfae9256d83e4fb07 /synapse/util/async_helpers.py | |
parent | Add type hints to synapse._scripts (#11297) (diff) | |
download | synapse-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.py | 5 |
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 |