diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2021-04-05 15:10:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-05 09:10:18 -0400 |
commit | e2b8a90897e137fd118768a3bf35b70642916eb7 (patch) | |
tree | 60562fb54b2af8c61e940624f6821cbacf98a06c /synapse/util | |
parent | Fix version for bugbear (#9734) (diff) | |
download | synapse-e2b8a90897e137fd118768a3bf35b70642916eb7.tar.xz |
Update mypy configuration: `no_implicit_optional = True` (#9742)
Diffstat (limited to 'synapse/util')
-rw-r--r-- | synapse/util/caches/deferred_cache.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/util/caches/deferred_cache.py b/synapse/util/caches/deferred_cache.py index 1adc92eb90..dd392cf694 100644 --- a/synapse/util/caches/deferred_cache.py +++ b/synapse/util/caches/deferred_cache.py @@ -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) |