flush-memcached: Replace a type: ignore with an assert.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-06-22 21:03:23 -07:00 committed by Tim Abbott
parent e883567146
commit a4f2704301
1 changed files with 2 additions and 1 deletions

View File

@ -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()