mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 09:22:13 -04:00
Convert state resolution to async/await (#7942)
This commit is contained in:
parent
e739b20588
commit
b975fa2e99
18 changed files with 198 additions and 184 deletions
|
@ -17,7 +17,7 @@
|
|||
"""
|
||||
Utilities for running the unit tests
|
||||
"""
|
||||
from typing import Awaitable, TypeVar
|
||||
from typing import Any, Awaitable, TypeVar
|
||||
|
||||
TV = TypeVar("TV")
|
||||
|
||||
|
@ -36,3 +36,8 @@ def get_awaitable_result(awaitable: Awaitable[TV]) -> TV:
|
|||
|
||||
# if next didn't raise, the awaitable hasn't completed.
|
||||
raise Exception("awaitable has not yet completed")
|
||||
|
||||
|
||||
async def make_awaitable(result: Any):
|
||||
"""Create an awaitable that just returns a result."""
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue