run black over stubs, add checking to travis

This commit is contained in:
Maxim Kurnikov
2018-12-03 18:52:44 +03:00
parent d5bc7d4ab2
commit cf6119bf9b
420 changed files with 2295 additions and 8384 deletions

View File

@@ -2,7 +2,6 @@ from typing import Any, Callable, Dict, Optional, Union
from django.core.cache.backends.base import BaseCache
class Options:
db_table: str = ...
app_label: str = ...
@@ -22,40 +21,19 @@ class BaseDatabaseCache(BaseCache):
key_prefix: str
version: int
cache_model_class: Any = ...
def __init__(
self,
table: str,
params: Dict[str, Union[Callable, Dict[str, int], int, str]],
) -> None: ...
def __init__(self, table: str, params: Dict[str, Union[Callable, Dict[str, int], int, str]]) -> None: ...
class DatabaseCache(BaseDatabaseCache):
default_timeout: int
key_func: Callable
key_prefix: str
version: int
def get(
self,
key: str,
default: Optional[Union[int, str]] = ...,
version: Optional[int] = ...,
) -> Any: ...
def set(
self,
key: str,
value: Any,
timeout: Any = ...,
version: Optional[int] = ...,
) -> None: ...
def get(self, key: str, default: Optional[Union[int, str]] = ..., version: Optional[int] = ...) -> Any: ...
def set(self, key: str, value: Any, timeout: Any = ..., version: Optional[int] = ...) -> None: ...
def add(
self,
key: str,
value: Union[Dict[str, int], bytes, int, str],
timeout: Any = ...,
version: Optional[int] = ...,
) -> bool: ...
def touch(
self, key: str, timeout: Any = ..., version: None = ...
self, key: str, value: Union[Dict[str, int], bytes, int, str], timeout: Any = ..., version: Optional[int] = ...
) -> bool: ...
def touch(self, key: str, timeout: Any = ..., version: None = ...) -> bool: ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
def has_key(self, key: str, version: Optional[int] = ...) -> Any: ...
def clear(self) -> None: ...