mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 02:54:49 -04:00
More types for synapse.util, part 1 (#10888)
The following modules now pass `disallow_untyped_defs`: * synapse.util.caches.cached_call * synapse.util.caches.lrucache * synapse.util.caches.response_cache * synapse.util.caches.stream_change_cache * synapse.util.caches.ttlcache pass * synapse.util.daemonize * synapse.util.patch_inline_callbacks pass `no-untyped-defs` * synapse.util.versionstring Additional typing in synapse.util.metrics. Didn't get this to pass `no-untyped-defs`, think I'll need to watch #10847
This commit is contained in:
parent
6744273f0b
commit
f8d0f72b27
12 changed files with 134 additions and 73 deletions
|
@ -85,7 +85,7 @@ class CachedCall(Generic[TV]):
|
|||
# result in the deferred, since `awaiting` a deferred destroys its result.
|
||||
# (Also, if it's a Failure, GCing the deferred would log a critical error
|
||||
# about unhandled Failures)
|
||||
def got_result(r):
|
||||
def got_result(r: Union[TV, Failure]) -> None:
|
||||
self._result = r
|
||||
|
||||
self._deferred.addBoth(got_result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue