mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:14:58 -04:00
Update mypy configuration: no_implicit_optional = True
(#9742)
This commit is contained in:
parent
4609e58970
commit
e2b8a90897
10 changed files with 21 additions and 11 deletions
|
@ -283,7 +283,9 @@ class DeferredCache(Generic[KT, VT]):
|
|||
# we return a new Deferred which will be called before any subsequent observers.
|
||||
return observable.observe()
|
||||
|
||||
def prefill(self, key: KT, value: VT, callback: Callable[[], None] = None):
|
||||
def prefill(
|
||||
self, key: KT, value: VT, callback: Optional[Callable[[], None]] = None
|
||||
):
|
||||
callbacks = [callback] if callback else []
|
||||
self.cache.set(key, value, callbacks=callbacks)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue