improved version

This commit is contained in:
Maxim Kurnikov
2018-07-29 20:06:41 +03:00
parent c180555415
commit 89bb6eac75
160 changed files with 1007 additions and 607 deletions
+1 -1
View File
@@ -19,5 +19,5 @@ class CacheHandler:
class DefaultCacheProxy:
def __contains__(self, key: str) -> bool: ...
def __getattr__(self, name: str) -> Union[OrderedDict, Callable, Dict[str, float]]: ...
def __getattr__(self, name: str) -> Union[OrderedDict, Dict[str, float], Callable]: ...
def __setattr__(self, name: str, value: Callable) -> None: ...
+2 -2
View File
@@ -27,7 +27,7 @@ class BaseCache:
def get_or_set(
self,
key: str,
default: Optional[Union[str, Callable, int]],
default: Optional[Union[str, int, Callable]],
timeout: object = ...,
version: Optional[int] = ...
) -> Optional[Union[str, int]]: ...
@@ -36,7 +36,7 @@ class BaseCache:
def make_key(self, key: Union[str, int], version: Optional[Union[str, int]] = ...) -> str: ...
def set_many(
self,
data: Union[Dict[str, str], Dict[str, Union[Dict[str, int], str]], Dict[str, int], OrderedDict],
data: Union[Dict[str, Union[Dict[str, int], str]], OrderedDict, Dict[str, str], Dict[str, int]],
timeout: object = ...,
version: Optional[int] = ...
) -> List[Any]: ...
+2 -2
View File
@@ -10,11 +10,11 @@ from typing import (
class BaseDatabaseCache:
def __init__(self, table: str, params: Dict[str, Union[int, Callable, str, Dict[str, int]]]) -> None: ...
def __init__(self, table: str, params: Dict[str, Union[Callable, Dict[str, int], str, int]]) -> None: ...
class DatabaseCache:
def _base_set(self, mode: str, key: str, value: Any, timeout: object = ...): ...
def _base_set(self, mode: str, key: str, value: object, timeout: object = ...): ...
def _cull(self, db: str, cursor: CursorWrapper, now: datetime) -> None: ...
def add(
self,
+1 -1
View File
@@ -14,7 +14,7 @@ class DummyCache:
def set(
self,
key: str,
value: Union[str, int, Dict[str, Any]],
value: Union[str, Dict[str, Any], int],
timeout: object = ...,
version: Optional[str] = ...
) -> None: ...
+1 -1
View File
@@ -13,7 +13,7 @@ from typing import (
)
def _write_content(f: Union[BufferedRandom, BufferedWriter], expiry: float, value: Any) -> None: ...
def _write_content(f: Union[BufferedRandom, BufferedWriter], expiry: float, value: object) -> None: ...
class FileBasedCache:
+2 -2
View File
@@ -14,7 +14,7 @@ class LocMemCache:
def add(
self,
key: str,
value: Union[int, Dict[str, int], str, Dict[str, str]],
value: Union[int, str, Dict[str, str], Dict[str, int]],
timeout: object = ...,
version: Optional[int] = ...
): ...
@@ -31,7 +31,7 @@ class LocMemCache:
def set(
self,
key: Union[str, int],
value: Any,
value: object,
timeout: object = ...,
version: Optional[int] = ...
) -> None: ...