zerver/lib/cache.py: Fix get_cache_backend's annotation.

This commit is contained in:
Eklavya Sharma 2016-06-11 15:48:44 +05:30 committed by Tim Abbott
parent 0b2d1c30e9
commit f82b28e835
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ from django.core.cache import cache as djcache
from django.core.cache import get_cache
from django.conf import settings
from django.db.models import Q
from django.core.cache.backends.base import BaseCache
from typing import Any, Callable, Iterable, Optional, Union, TypeVar
@ -92,7 +93,7 @@ def bounce_key_prefix_for_testing(test_name):
KEY_PREFIX = test_name + u':' + text_type(os.getpid()) + u':'
def get_cache_backend(cache_name):
# type: (Optional[str]) -> get_cache
# type: (Optional[str]) -> BaseCache
if cache_name is None:
return djcache
return get_cache(cache_name)