mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 10:51:16 +08:00
fourth iteration
This commit is contained in:
51
django-stubs/core/cache/backends/db.pyi
vendored
51
django-stubs/core/cache/backends/db.pyi
vendored
@@ -1,9 +1,6 @@
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||
from typing import Any, Callable, Dict, Optional, Union
|
||||
|
||||
from django.core.cache.backends.base import BaseCache
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.query import QuerySet
|
||||
from django.http.response import HttpResponse
|
||||
|
||||
|
||||
class Options:
|
||||
@@ -46,53 +43,11 @@ class DatabaseCache(BaseDatabaseCache):
|
||||
key: str,
|
||||
default: Optional[Union[int, str]] = ...,
|
||||
version: Optional[int] = ...,
|
||||
) -> Optional[
|
||||
Union[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Callable,
|
||||
Dict[str, int],
|
||||
List[int],
|
||||
Tuple[int, int, int, int],
|
||||
Type[Any],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
],
|
||||
List[Any],
|
||||
bytes,
|
||||
Model,
|
||||
QuerySet,
|
||||
HttpResponse,
|
||||
int,
|
||||
str,
|
||||
]
|
||||
]: ...
|
||||
) -> Any: ...
|
||||
def set(
|
||||
self,
|
||||
key: str,
|
||||
value: Union[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Callable,
|
||||
Dict[str, int],
|
||||
List[int],
|
||||
Tuple[int, int, int, int],
|
||||
Type[Any],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
],
|
||||
List[Any],
|
||||
bytes,
|
||||
Model,
|
||||
QuerySet,
|
||||
HttpResponse,
|
||||
int,
|
||||
str,
|
||||
],
|
||||
value: Any,
|
||||
timeout: Any = ...,
|
||||
version: Optional[int] = ...,
|
||||
) -> None: ...
|
||||
|
||||
19
django-stubs/core/cache/backends/dummy.pyi
vendored
19
django-stubs/core/cache/backends/dummy.pyi
vendored
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
from django.core.cache.backends.base import BaseCache
|
||||
|
||||
@@ -21,22 +21,7 @@ class DummyCache(BaseCache):
|
||||
def set(
|
||||
self,
|
||||
key: str,
|
||||
value: Union[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Callable,
|
||||
Dict[str, int],
|
||||
List[int],
|
||||
Tuple[int, int, int, int],
|
||||
Type[Any],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
value: Union[Dict[str, Any], int, str],
|
||||
timeout: Any = ...,
|
||||
version: Optional[str] = ...,
|
||||
) -> None: ...
|
||||
|
||||
27
django-stubs/core/cache/backends/filebased.pyi
vendored
27
django-stubs/core/cache/backends/filebased.pyi
vendored
@@ -1,9 +1,6 @@
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||
from typing import Any, Callable, Dict, Optional, Union
|
||||
|
||||
from django.core.cache.backends.base import BaseCache
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.query import QuerySet
|
||||
from django.http.response import HttpResponse
|
||||
|
||||
|
||||
class FileBasedCache(BaseCache):
|
||||
@@ -38,27 +35,7 @@ class FileBasedCache(BaseCache):
|
||||
def set(
|
||||
self,
|
||||
key: str,
|
||||
value: Union[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Callable,
|
||||
Dict[str, int],
|
||||
List[int],
|
||||
Tuple[int, int, int, int],
|
||||
Type[Any],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
],
|
||||
List[Any],
|
||||
bytes,
|
||||
Model,
|
||||
QuerySet,
|
||||
HttpResponse,
|
||||
int,
|
||||
str,
|
||||
],
|
||||
value: Any,
|
||||
timeout: Any = ...,
|
||||
version: Optional[int] = ...,
|
||||
) -> None: ...
|
||||
|
||||
50
django-stubs/core/cache/backends/locmem.pyi
vendored
50
django-stubs/core/cache/backends/locmem.pyi
vendored
@@ -1,10 +1,7 @@
|
||||
from datetime import datetime
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
||||
from typing import Any, Callable, Dict, Optional, Union
|
||||
|
||||
from django.core.cache.backends.base import BaseCache
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.query import QuerySet
|
||||
from django.http.response import HttpResponse
|
||||
|
||||
|
||||
class LocMemCache(BaseCache):
|
||||
@@ -37,52 +34,11 @@ class LocMemCache(BaseCache):
|
||||
key: Union[int, str],
|
||||
default: Optional[Union[int, str]] = ...,
|
||||
version: Optional[int] = ...,
|
||||
) -> Union[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Callable,
|
||||
Dict[str, int],
|
||||
List[int],
|
||||
Tuple[int, int, int, int],
|
||||
Type[Any],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
],
|
||||
List[str],
|
||||
bytes,
|
||||
Model,
|
||||
QuerySet,
|
||||
HttpResponse,
|
||||
int,
|
||||
str,
|
||||
]: ...
|
||||
) -> Any: ...
|
||||
def set(
|
||||
self,
|
||||
key: Union[int, str],
|
||||
value: Union[
|
||||
Dict[
|
||||
str,
|
||||
Union[
|
||||
Callable,
|
||||
Dict[str, int],
|
||||
List[int],
|
||||
Tuple[int, int, int, int],
|
||||
Type[Any],
|
||||
int,
|
||||
str,
|
||||
],
|
||||
],
|
||||
Dict[str, Union[datetime, str]],
|
||||
List[str],
|
||||
bytes,
|
||||
Model,
|
||||
QuerySet,
|
||||
HttpResponse,
|
||||
int,
|
||||
str,
|
||||
],
|
||||
value: Any,
|
||||
timeout: Any = ...,
|
||||
version: Optional[int] = ...,
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user