mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 14:24:10 -04:00
Use inline type hints in http/federation/
, storage/
and util/
(#10381)
This commit is contained in:
parent
3acf85c85f
commit
bdfde6dca1
38 changed files with 149 additions and 161 deletions
|
@ -63,9 +63,9 @@ class CachedCall(Generic[TV]):
|
|||
f: The underlying function. Only one call to this function will be alive
|
||||
at once (per instance of CachedCall)
|
||||
"""
|
||||
self._callable = f # type: Optional[Callable[[], Awaitable[TV]]]
|
||||
self._deferred = None # type: Optional[Deferred]
|
||||
self._result = None # type: Union[None, Failure, TV]
|
||||
self._callable: Optional[Callable[[], Awaitable[TV]]] = f
|
||||
self._deferred: Optional[Deferred] = None
|
||||
self._result: Union[None, Failure, TV] = None
|
||||
|
||||
async def get(self) -> TV:
|
||||
"""Kick off the call if necessary, and return the result"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue