mirror of https://github.com/zulip/zulip.git
typing: Tighten type annotation for settings.CACHES.
In zliencer.management.commands.populate_db, we assign the value of settings.CACHES["default"] to `default_cache`. django-stubs infers `settings.CACHES` to be `Dict[str, object]`. We make the type specific enough so that we can access `default_cache` as a dict. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
parent
1860b0b7ac
commit
c968b299db
|
@ -337,7 +337,7 @@ SESSION_ENGINE = "zerver.lib.safe_session_cached_db"
|
||||||
|
|
||||||
MEMCACHED_PASSWORD = get_secret("memcached_password")
|
MEMCACHED_PASSWORD = get_secret("memcached_password")
|
||||||
|
|
||||||
CACHES = {
|
CACHES: Dict[str, Dict[str, object]] = {
|
||||||
"default": {
|
"default": {
|
||||||
"BACKEND": "zerver.lib.singleton_bmemcached.SingletonBMemcached",
|
"BACKEND": "zerver.lib.singleton_bmemcached.SingletonBMemcached",
|
||||||
"LOCATION": MEMCACHED_LOCATION,
|
"LOCATION": MEMCACHED_LOCATION,
|
||||||
|
|
Loading…
Reference in New Issue