mirror of https://github.com/zulip/zulip.git
flush-memcached: Replace a type: ignore with an assert.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
e883567146
commit
a4f2704301
|
@ -13,10 +13,11 @@ import pylibmc
|
||||||
|
|
||||||
from zproject import settings
|
from zproject import settings
|
||||||
|
|
||||||
|
assert isinstance(settings.CACHES["default"], dict) # for mypy
|
||||||
pylibmc.Client(
|
pylibmc.Client(
|
||||||
[settings.MEMCACHED_LOCATION],
|
[settings.MEMCACHED_LOCATION],
|
||||||
binary=True,
|
binary=True,
|
||||||
username=settings.MEMCACHED_USERNAME,
|
username=settings.MEMCACHED_USERNAME,
|
||||||
password=settings.MEMCACHED_PASSWORD,
|
password=settings.MEMCACHED_PASSWORD,
|
||||||
behaviors=settings.CACHES["default"]["OPTIONS"], # type: ignore[index] # settings not typed properly
|
behaviors=settings.CACHES["default"]["OPTIONS"],
|
||||||
).flush_all()
|
).flush_all()
|
||||||
|
|
Loading…
Reference in New Issue