Skip to content

Commit

Permalink
flush-memcached: Replace a type: ignore with an assert.
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk authored and timabbott committed Jun 23, 2020
1 parent e883567 commit a4f2704
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/setup/flush-memcached
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ import pylibmc

from zproject import settings

assert isinstance(settings.CACHES["default"], dict) # for mypy
pylibmc.Client(
[settings.MEMCACHED_LOCATION],
binary=True,
username=settings.MEMCACHED_USERNAME,
password=settings.MEMCACHED_PASSWORD,
behaviors=settings.CACHES["default"]["OPTIONS"], # type: ignore[index] # settings not typed properly
behaviors=settings.CACHES["default"]["OPTIONS"],
).flush_all()

0 comments on commit a4f2704

Please sign in to comment.