Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/apps/__init__.pyi +3 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/apps/config.pyi +23 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/apps/registry.pyi +40 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/__init__.pyi +26 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/cookie.pyi +5 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/multipartparser.pyi +54 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/request.pyi +111 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/response.pyi +137 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/__init__.pyi +0 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/cache.pyi +31 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/clickjacking.pyi +7 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/common.pyi +17 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/csrf.pyi +33 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/gzip.pyi +10 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/http.pyi +7 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/locale.pyi +10 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/security.pyi +17 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/__init__.pyi +20 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/client.pyi +132 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/html.pyi +38 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/runner.pyi +133 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/selenium.pyi +14 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/signals.pyi +21 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/testcases.pyi +229 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/utils.pyi +155 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/_os.pyi +11 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/crypto.pyi +15 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/inspect.pyi +8 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/module_loading.pyi +6 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/six.pyi +106 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/timesince.pyi +10 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/translation/__init__.pyi +72 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/xmlutils.pyi +11 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/__init__.pyi +1 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/__init__.pyi +0 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/cache.pyi +7 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/clickjacking.pyi +7 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/csrf.pyi +19 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/debug.pyi +4 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/gzip.pyi +5 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/http.pyi +12 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/vary.pyi +6 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/base.pyi +44 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/dates.pyi +82 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/detail.pyi +28 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/edit.pyi +46 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/list.pyi +37 -0
- mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/i18n.pyi +31 -0
- mantis_evalkit/lib/python3.10/site-packages/wheel/__init__.py +3 -0
- mantis_evalkit/lib/python3.10/site-packages/wheel/__main__.py +23 -0
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/apps/__init__.pyi
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from .config import AppConfig as AppConfig
|
| 2 |
+
|
| 3 |
+
from .registry import apps as apps
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/apps/config.pyi
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Iterator, Type, Optional, Dict
|
| 2 |
+
|
| 3 |
+
from django.apps.registry import Apps
|
| 4 |
+
from django.db.models.base import Model
|
| 5 |
+
|
| 6 |
+
MODELS_MODULE_NAME: str
|
| 7 |
+
|
| 8 |
+
class AppConfig:
|
| 9 |
+
name: str = ...
|
| 10 |
+
module: Optional[Any] = ...
|
| 11 |
+
apps: Optional[Apps] = ...
|
| 12 |
+
label: str = ...
|
| 13 |
+
verbose_name: str = ...
|
| 14 |
+
path: str = ...
|
| 15 |
+
models_module: Optional[str] = ...
|
| 16 |
+
models: Dict[str, Type[Model]] = ...
|
| 17 |
+
def __init__(self, app_name: str, app_module: Optional[Any]) -> None: ...
|
| 18 |
+
@classmethod
|
| 19 |
+
def create(cls, entry: str) -> AppConfig: ...
|
| 20 |
+
def get_model(self, model_name: str, require_ready: bool = ...) -> Type[Model]: ...
|
| 21 |
+
def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...) -> Iterator[Type[Model]]: ...
|
| 22 |
+
def import_models(self) -> None: ...
|
| 23 |
+
def ready(self) -> None: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/apps/registry.pyi
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import threading
|
| 2 |
+
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type, Union
|
| 3 |
+
|
| 4 |
+
from django.db.models.base import Model
|
| 5 |
+
|
| 6 |
+
from .config import AppConfig
|
| 7 |
+
|
| 8 |
+
class Apps:
|
| 9 |
+
all_models: Dict[str, Dict[str, Type[Model]]] = ...
|
| 10 |
+
app_configs: Dict[str, AppConfig] = ...
|
| 11 |
+
stored_app_configs: List[Any] = ...
|
| 12 |
+
apps_ready: bool = ...
|
| 13 |
+
ready_event: threading.Event = ...
|
| 14 |
+
loading: bool = ...
|
| 15 |
+
_pending_operations: Dict[Tuple[str, str], List]
|
| 16 |
+
models_ready: bool = ...
|
| 17 |
+
ready: bool = ...
|
| 18 |
+
def __init__(self, installed_apps: Optional[Iterable[Union[AppConfig, str]]] = ...) -> None: ...
|
| 19 |
+
def populate(self, installed_apps: Iterable[Union[AppConfig, str]] = ...) -> None: ...
|
| 20 |
+
def check_apps_ready(self) -> None: ...
|
| 21 |
+
def check_models_ready(self) -> None: ...
|
| 22 |
+
def get_app_configs(self) -> Iterable[AppConfig]: ...
|
| 23 |
+
def get_app_config(self, app_label: str) -> AppConfig: ...
|
| 24 |
+
# it's not possible to support it in plugin properly now
|
| 25 |
+
def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...) -> List[Type[Model]]: ...
|
| 26 |
+
def get_model(self, app_label: str, model_name: Optional[str] = ..., require_ready: bool = ...) -> Type[Any]: ...
|
| 27 |
+
def register_model(self, app_label: str, model: Type[Model]) -> None: ...
|
| 28 |
+
def is_installed(self, app_name: str) -> bool: ...
|
| 29 |
+
def get_containing_app_config(self, object_name: str) -> Optional[AppConfig]: ...
|
| 30 |
+
def get_registered_model(self, app_label: str, model_name: str) -> Type[Model]: ...
|
| 31 |
+
def get_swappable_settings_name(self, to_string: str) -> Optional[str]: ...
|
| 32 |
+
def set_available_apps(self, available: Iterable[str]) -> None: ...
|
| 33 |
+
def unset_available_apps(self) -> None: ...
|
| 34 |
+
def set_installed_apps(self, installed: Iterable[str]) -> None: ...
|
| 35 |
+
def unset_installed_apps(self) -> None: ...
|
| 36 |
+
def clear_cache(self) -> None: ...
|
| 37 |
+
def lazy_model_operation(self, function: Callable, *model_keys: Any) -> None: ...
|
| 38 |
+
def do_pending_operations(self, model: Type[Model]) -> None: ...
|
| 39 |
+
|
| 40 |
+
apps: Apps
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/__init__.pyi
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from .request import (
|
| 2 |
+
HttpRequest as HttpRequest,
|
| 3 |
+
QueryDict as QueryDict,
|
| 4 |
+
RawPostDataException as RawPostDataException,
|
| 5 |
+
UnreadablePostError as UnreadablePostError,
|
| 6 |
+
)
|
| 7 |
+
|
| 8 |
+
from .response import (
|
| 9 |
+
BadHeaderError as BadHeaderError,
|
| 10 |
+
FileResponse as FileResponse,
|
| 11 |
+
Http404 as Http404,
|
| 12 |
+
HttpResponse as HttpResponse,
|
| 13 |
+
HttpResponseBadRequest as HttpResponseBadRequest,
|
| 14 |
+
HttpResponseForbidden as HttpResponseForbidden,
|
| 15 |
+
HttpResponseGone as HttpResponseGone,
|
| 16 |
+
HttpResponseNotAllowed as HttpResponseNotAllowed,
|
| 17 |
+
HttpResponseNotFound as HttpResponseNotFound,
|
| 18 |
+
HttpResponseNotModified as HttpResponseNotModified,
|
| 19 |
+
HttpResponsePermanentRedirect as HttpResponsePermanentRedirect,
|
| 20 |
+
HttpResponseRedirect as HttpResponseRedirect,
|
| 21 |
+
HttpResponseServerError as HttpResponseServerError,
|
| 22 |
+
JsonResponse as JsonResponse,
|
| 23 |
+
StreamingHttpResponse as StreamingHttpResponse,
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
from .cookie import SimpleCookie as SimpleCookie, parse_cookie as parse_cookie
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/cookie.pyi
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Dict
|
| 2 |
+
|
| 3 |
+
SimpleCookie: Any
|
| 4 |
+
|
| 5 |
+
def parse_cookie(cookie: str) -> Dict[str, str]: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/multipartparser.pyi
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from io import BytesIO, StringIO
|
| 2 |
+
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
|
| 3 |
+
|
| 4 |
+
from django.http.request import QueryDict
|
| 5 |
+
from django.utils.datastructures import ImmutableList, MultiValueDict
|
| 6 |
+
|
| 7 |
+
class MultiPartParserError(Exception): ...
|
| 8 |
+
class InputStreamExhausted(Exception): ...
|
| 9 |
+
|
| 10 |
+
class MultiPartParser:
|
| 11 |
+
def __init__(
|
| 12 |
+
self,
|
| 13 |
+
META: Dict[str, Any],
|
| 14 |
+
input_data: Union[StringIO, BytesIO],
|
| 15 |
+
upload_handlers: Union[List[Any], ImmutableList],
|
| 16 |
+
encoding: Optional[str] = ...,
|
| 17 |
+
) -> None: ...
|
| 18 |
+
def parse(self) -> Tuple[QueryDict, MultiValueDict]: ...
|
| 19 |
+
def handle_file_complete(self, old_field_name: str, counters: List[int]) -> None: ...
|
| 20 |
+
def IE_sanitize(self, filename: str) -> str: ...
|
| 21 |
+
|
| 22 |
+
class LazyStream:
|
| 23 |
+
length: None = ...
|
| 24 |
+
position: int = ...
|
| 25 |
+
def __init__(self, producer: Union[BoundaryIter, ChunkIter], length: None = ...) -> None: ...
|
| 26 |
+
def tell(self): ...
|
| 27 |
+
def read(self, size: Optional[int] = ...) -> bytes: ...
|
| 28 |
+
def __next__(self) -> bytes: ...
|
| 29 |
+
def close(self) -> None: ...
|
| 30 |
+
def __iter__(self) -> LazyStream: ...
|
| 31 |
+
def unget(self, bytes: bytes) -> None: ...
|
| 32 |
+
|
| 33 |
+
class ChunkIter:
|
| 34 |
+
flo: BytesIO = ...
|
| 35 |
+
chunk_size: int = ...
|
| 36 |
+
def __init__(self, flo: BytesIO, chunk_size: int = ...) -> None: ...
|
| 37 |
+
def __next__(self) -> bytes: ...
|
| 38 |
+
def __iter__(self): ...
|
| 39 |
+
|
| 40 |
+
class InterBoundaryIter:
|
| 41 |
+
def __init__(self, stream: LazyStream, boundary: bytes) -> None: ...
|
| 42 |
+
def __iter__(self) -> InterBoundaryIter: ...
|
| 43 |
+
def __next__(self) -> LazyStream: ...
|
| 44 |
+
|
| 45 |
+
class BoundaryIter:
|
| 46 |
+
def __init__(self, stream: LazyStream, boundary: bytes) -> None: ...
|
| 47 |
+
def __iter__(self): ...
|
| 48 |
+
def __next__(self) -> bytes: ...
|
| 49 |
+
|
| 50 |
+
class Parser:
|
| 51 |
+
def __init__(self, stream: LazyStream, boundary: bytes) -> None: ...
|
| 52 |
+
def __iter__(self) -> Iterator[Tuple[str, Dict[str, Tuple[str, Dict[str, Union[bytes, str]]]], LazyStream]]: ...
|
| 53 |
+
|
| 54 |
+
def parse_header(line: bytes) -> Tuple[str, Dict[str, Any]]: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/request.pyi
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from io import BytesIO
|
| 2 |
+
from typing import (
|
| 3 |
+
Any,
|
| 4 |
+
BinaryIO,
|
| 5 |
+
Dict,
|
| 6 |
+
Iterable,
|
| 7 |
+
List,
|
| 8 |
+
Mapping,
|
| 9 |
+
Optional,
|
| 10 |
+
Pattern,
|
| 11 |
+
Set,
|
| 12 |
+
Tuple,
|
| 13 |
+
Type,
|
| 14 |
+
TypeVar,
|
| 15 |
+
Union,
|
| 16 |
+
overload,
|
| 17 |
+
)
|
| 18 |
+
|
| 19 |
+
from django.contrib.auth.base_user import AbstractBaseUser
|
| 20 |
+
from django.contrib.auth.models import AnonymousUser
|
| 21 |
+
from django.contrib.sessions.backends.base import SessionBase
|
| 22 |
+
from django.contrib.sites.models import Site
|
| 23 |
+
from django.utils.datastructures import CaseInsensitiveMapping, ImmutableList, MultiValueDict
|
| 24 |
+
|
| 25 |
+
from django.core.files import uploadedfile, uploadhandler
|
| 26 |
+
from django.urls import ResolverMatch
|
| 27 |
+
|
| 28 |
+
RAISE_ERROR: object = ...
|
| 29 |
+
host_validation_re: Pattern = ...
|
| 30 |
+
|
| 31 |
+
class UnreadablePostError(IOError): ...
|
| 32 |
+
class RawPostDataException(Exception): ...
|
| 33 |
+
|
| 34 |
+
UploadHandlerList = Union[List[uploadhandler.FileUploadHandler], ImmutableList[uploadhandler.FileUploadHandler]]
|
| 35 |
+
|
| 36 |
+
class HttpHeaders(CaseInsensitiveMapping):
|
| 37 |
+
HTTP_PREFIX: str = ...
|
| 38 |
+
UNPREFIXED_HEADERS: Set[str] = ...
|
| 39 |
+
def __init__(self, environ: Mapping[str, Any]) -> None: ...
|
| 40 |
+
@classmethod
|
| 41 |
+
def parse_header_name(cls, header: str) -> Optional[str]: ...
|
| 42 |
+
|
| 43 |
+
class HttpRequest(BytesIO):
|
| 44 |
+
GET: QueryDict = ...
|
| 45 |
+
POST: QueryDict = ...
|
| 46 |
+
COOKIES: Dict[str, str] = ...
|
| 47 |
+
META: Dict[str, Any] = ...
|
| 48 |
+
FILES: MultiValueDict[str, uploadedfile.UploadedFile] = ...
|
| 49 |
+
path: str = ...
|
| 50 |
+
path_info: str = ...
|
| 51 |
+
method: Optional[str] = ...
|
| 52 |
+
resolver_match: ResolverMatch = ...
|
| 53 |
+
content_type: Optional[str] = ...
|
| 54 |
+
content_params: Optional[Dict[str, str]] = ...
|
| 55 |
+
user: Union[AbstractBaseUser, AnonymousUser]
|
| 56 |
+
site: Site
|
| 57 |
+
session: SessionBase
|
| 58 |
+
encoding: Optional[str] = ...
|
| 59 |
+
upload_handlers: UploadHandlerList = ...
|
| 60 |
+
def __init__(self) -> None: ...
|
| 61 |
+
def get_host(self) -> str: ...
|
| 62 |
+
def get_port(self) -> str: ...
|
| 63 |
+
def get_full_path(self, force_append_slash: bool = ...) -> str: ...
|
| 64 |
+
def get_full_path_info(self, force_append_slash: bool = ...) -> str: ...
|
| 65 |
+
def get_signed_cookie(
|
| 66 |
+
self, key: str, default: Any = ..., salt: str = ..., max_age: Optional[int] = ...
|
| 67 |
+
) -> Optional[str]: ...
|
| 68 |
+
def get_raw_uri(self) -> str: ...
|
| 69 |
+
def build_absolute_uri(self, location: Optional[str] = ...) -> str: ...
|
| 70 |
+
@property
|
| 71 |
+
def scheme(self) -> Optional[str]: ...
|
| 72 |
+
def is_secure(self) -> bool: ...
|
| 73 |
+
def is_ajax(self) -> bool: ...
|
| 74 |
+
def parse_file_upload(
|
| 75 |
+
self, META: Mapping[str, Any], post_data: BinaryIO
|
| 76 |
+
) -> Tuple[QueryDict, MultiValueDict[str, uploadedfile.UploadedFile]]: ...
|
| 77 |
+
@property
|
| 78 |
+
def headers(self) -> HttpHeaders: ...
|
| 79 |
+
@property
|
| 80 |
+
def body(self) -> bytes: ...
|
| 81 |
+
def _load_post_and_files(self) -> None: ...
|
| 82 |
+
|
| 83 |
+
_Q = TypeVar("_Q", bound="QueryDict")
|
| 84 |
+
|
| 85 |
+
class QueryDict(MultiValueDict[str, str]):
|
| 86 |
+
encoding: str = ...
|
| 87 |
+
_mutable: bool = ...
|
| 88 |
+
def __init__(
|
| 89 |
+
self, query_string: Optional[Union[str, bytes]] = ..., mutable: bool = ..., encoding: Optional[str] = ...
|
| 90 |
+
) -> None: ...
|
| 91 |
+
def setlist(self, key: str, list_: List[str]) -> None: ...
|
| 92 |
+
def setlistdefault(self, key: str, default_list: Optional[List[str]] = ...) -> List[str]: ...
|
| 93 |
+
def appendlist(self, key: str, value: str) -> None: ...
|
| 94 |
+
def urlencode(self, safe: Optional[str] = ...) -> str: ...
|
| 95 |
+
@classmethod
|
| 96 |
+
def fromkeys(
|
| 97 |
+
cls: Type[_Q],
|
| 98 |
+
iterable: Iterable[Union[bytes, str]],
|
| 99 |
+
value: Any = ...,
|
| 100 |
+
mutable: bool = ...,
|
| 101 |
+
encoding: Optional[str] = ...,
|
| 102 |
+
) -> _Q: ...
|
| 103 |
+
|
| 104 |
+
@overload
|
| 105 |
+
def bytes_to_text(s: bytes, encoding: str) -> str: ...
|
| 106 |
+
@overload
|
| 107 |
+
def bytes_to_text(s: str, encoding: str) -> str: ...
|
| 108 |
+
@overload
|
| 109 |
+
def bytes_to_text(s: None, encoding: str) -> None: ...
|
| 110 |
+
def split_domain_port(host: str) -> Tuple[str, str]: ...
|
| 111 |
+
def validate_host(host: str, allowed_hosts: Iterable[str]) -> bool: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/http/response.pyi
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import datetime
|
| 2 |
+
from io import BytesIO
|
| 3 |
+
from json import JSONEncoder
|
| 4 |
+
from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Type, Union, overload
|
| 5 |
+
|
| 6 |
+
from django.core.handlers.wsgi import WSGIRequest
|
| 7 |
+
from django.http.cookie import SimpleCookie
|
| 8 |
+
from django.test.client import Client
|
| 9 |
+
|
| 10 |
+
from django.template import Context, Template
|
| 11 |
+
from django.urls import ResolverMatch
|
| 12 |
+
|
| 13 |
+
class BadHeaderError(ValueError): ...
|
| 14 |
+
|
| 15 |
+
class HttpResponseBase(Iterable[Any]):
|
| 16 |
+
status_code: int = ...
|
| 17 |
+
cookies: SimpleCookie = ...
|
| 18 |
+
reason_phrase: str = ...
|
| 19 |
+
charset: str = ...
|
| 20 |
+
closed: bool = ...
|
| 21 |
+
def __init__(
|
| 22 |
+
self,
|
| 23 |
+
content_type: Optional[str] = ...,
|
| 24 |
+
status: Optional[int] = ...,
|
| 25 |
+
reason: Optional[str] = ...,
|
| 26 |
+
charset: Optional[str] = ...,
|
| 27 |
+
) -> None: ...
|
| 28 |
+
def serialize_headers(self) -> bytes: ...
|
| 29 |
+
def __setitem__(self, header: Union[str, bytes], value: Union[str, bytes, int]) -> None: ...
|
| 30 |
+
def __delitem__(self, header: Union[str, bytes]) -> None: ...
|
| 31 |
+
def __getitem__(self, header: Union[str, bytes]) -> str: ...
|
| 32 |
+
def has_header(self, header: str) -> bool: ...
|
| 33 |
+
def items(self) -> Iterable[Tuple[str, str]]: ...
|
| 34 |
+
@overload
|
| 35 |
+
def get(self, header: Union[str, bytes], alternate: Optional[str]) -> str: ...
|
| 36 |
+
@overload
|
| 37 |
+
def get(self, header: Union[str, bytes]) -> Optional[str]: ...
|
| 38 |
+
def set_cookie(
|
| 39 |
+
self,
|
| 40 |
+
key: str,
|
| 41 |
+
value: str = ...,
|
| 42 |
+
max_age: Optional[int] = ...,
|
| 43 |
+
expires: Optional[Union[str, datetime.datetime]] = ...,
|
| 44 |
+
path: str = ...,
|
| 45 |
+
domain: Optional[str] = ...,
|
| 46 |
+
secure: bool = ...,
|
| 47 |
+
httponly: bool = ...,
|
| 48 |
+
samesite: str = ...,
|
| 49 |
+
) -> None: ...
|
| 50 |
+
def setdefault(self, key: str, value: str) -> None: ...
|
| 51 |
+
def set_signed_cookie(self, key: str, value: str, salt: str = ..., **kwargs: Any) -> None: ...
|
| 52 |
+
def delete_cookie(self, key: str, path: str = ..., domain: Optional[str] = ...) -> None: ...
|
| 53 |
+
def make_bytes(self, value: object) -> bytes: ...
|
| 54 |
+
def close(self) -> None: ...
|
| 55 |
+
def write(self, content: Union[str, bytes]) -> None: ...
|
| 56 |
+
def flush(self) -> None: ...
|
| 57 |
+
def tell(self) -> int: ...
|
| 58 |
+
def readable(self) -> bool: ...
|
| 59 |
+
def seekable(self) -> bool: ...
|
| 60 |
+
def writable(self) -> bool: ...
|
| 61 |
+
def writelines(self, lines: Iterable[object]): ...
|
| 62 |
+
def __iter__(self) -> Iterator[Any]: ...
|
| 63 |
+
|
| 64 |
+
class HttpResponse(HttpResponseBase):
|
| 65 |
+
content: Any
|
| 66 |
+
csrf_cookie_set: bool
|
| 67 |
+
redirect_chain: List[Tuple[str, int]]
|
| 68 |
+
sameorigin: bool
|
| 69 |
+
test_server_port: str
|
| 70 |
+
test_was_secure_request: bool
|
| 71 |
+
xframe_options_exempt: bool
|
| 72 |
+
streaming: bool = ...
|
| 73 |
+
def __init__(self, content: object = ..., *args: Any, **kwargs: Any) -> None: ...
|
| 74 |
+
def serialize(self) -> bytes: ...
|
| 75 |
+
@property
|
| 76 |
+
def url(self) -> str: ...
|
| 77 |
+
# Attributes assigned by monkey-patching in test client ClientHandler.__call__()
|
| 78 |
+
wsgi_request: WSGIRequest
|
| 79 |
+
# Attributes assigned by monkey-patching in test client Client.request()
|
| 80 |
+
client: Client
|
| 81 |
+
request: Dict[str, Any]
|
| 82 |
+
templates: List[Template]
|
| 83 |
+
context: Context
|
| 84 |
+
resolver_match: ResolverMatch
|
| 85 |
+
def json(self) -> Any: ...
|
| 86 |
+
|
| 87 |
+
class StreamingHttpResponse(HttpResponseBase):
|
| 88 |
+
content: Any
|
| 89 |
+
streaming_content: Iterator[Any]
|
| 90 |
+
def __init__(self, streaming_content: Iterable[Any] = ..., *args: Any, **kwargs: Any) -> None: ...
|
| 91 |
+
def getvalue(self) -> Any: ...
|
| 92 |
+
|
| 93 |
+
class FileResponse(StreamingHttpResponse):
|
| 94 |
+
client: Client
|
| 95 |
+
context: None
|
| 96 |
+
file_to_stream: Optional[BytesIO]
|
| 97 |
+
request: Dict[str, str]
|
| 98 |
+
resolver_match: ResolverMatch
|
| 99 |
+
templates: List[Any]
|
| 100 |
+
wsgi_request: WSGIRequest
|
| 101 |
+
block_size: int = ...
|
| 102 |
+
as_attachment: bool = ...
|
| 103 |
+
filename: str = ...
|
| 104 |
+
def __init__(self, *args: Any, as_attachment: bool = ..., filename: str = ..., **kwargs: Any) -> None: ...
|
| 105 |
+
def set_headers(self, filelike: BytesIO) -> None: ...
|
| 106 |
+
def json(self) -> Dict[str, Any]: ...
|
| 107 |
+
|
| 108 |
+
class HttpResponseRedirectBase(HttpResponse):
|
| 109 |
+
allowed_schemes: List[str] = ...
|
| 110 |
+
def __init__(self, redirect_to: str, *args: Any, **kwargs: Any) -> None: ...
|
| 111 |
+
|
| 112 |
+
class HttpResponseRedirect(HttpResponseRedirectBase): ...
|
| 113 |
+
class HttpResponsePermanentRedirect(HttpResponseRedirectBase): ...
|
| 114 |
+
|
| 115 |
+
class HttpResponseNotModified(HttpResponse):
|
| 116 |
+
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
| 117 |
+
|
| 118 |
+
class HttpResponseBadRequest(HttpResponse): ...
|
| 119 |
+
class HttpResponseNotFound(HttpResponse): ...
|
| 120 |
+
class HttpResponseForbidden(HttpResponse): ...
|
| 121 |
+
|
| 122 |
+
class HttpResponseNotAllowed(HttpResponse):
|
| 123 |
+
def __init__(self, permitted_methods: Iterable[str], *args: Any, **kwargs: Any) -> None: ...
|
| 124 |
+
|
| 125 |
+
class HttpResponseGone(HttpResponse): ...
|
| 126 |
+
class HttpResponseServerError(HttpResponse): ...
|
| 127 |
+
class Http404(Exception): ...
|
| 128 |
+
|
| 129 |
+
class JsonResponse(HttpResponse):
|
| 130 |
+
def __init__(
|
| 131 |
+
self,
|
| 132 |
+
data: Any,
|
| 133 |
+
encoder: Type[JSONEncoder] = ...,
|
| 134 |
+
safe: bool = ...,
|
| 135 |
+
json_dumps_params: Optional[Dict[str, Any]] = ...,
|
| 136 |
+
**kwargs: Any
|
| 137 |
+
) -> None: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/__init__.pyi
ADDED
|
File without changes
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/cache.pyi
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Optional, Union, Callable
|
| 2 |
+
|
| 3 |
+
from django.http.request import HttpRequest
|
| 4 |
+
from django.http.response import HttpResponse, HttpResponseBase
|
| 5 |
+
from django.utils.deprecation import MiddlewareMixin
|
| 6 |
+
|
| 7 |
+
from django.core.cache import BaseCache
|
| 8 |
+
|
| 9 |
+
class UpdateCacheMiddleware(MiddlewareMixin):
|
| 10 |
+
cache_timeout: float = ...
|
| 11 |
+
key_prefix: str = ...
|
| 12 |
+
cache_alias: str = ...
|
| 13 |
+
cache: BaseCache = ...
|
| 14 |
+
def process_response(
|
| 15 |
+
self, request: HttpRequest, response: Union[HttpResponseBase, str]
|
| 16 |
+
) -> Union[HttpResponseBase, str]: ...
|
| 17 |
+
|
| 18 |
+
class FetchFromCacheMiddleware(MiddlewareMixin):
|
| 19 |
+
key_prefix: str = ...
|
| 20 |
+
cache_alias: str = ...
|
| 21 |
+
cache: BaseCache = ...
|
| 22 |
+
def process_request(self, request: HttpRequest) -> Optional[HttpResponse]: ...
|
| 23 |
+
|
| 24 |
+
class CacheMiddleware(UpdateCacheMiddleware, FetchFromCacheMiddleware):
|
| 25 |
+
key_prefix: str = ...
|
| 26 |
+
cache_alias: str = ...
|
| 27 |
+
cache_timeout: float = ...
|
| 28 |
+
cache: BaseCache = ...
|
| 29 |
+
def __init__(
|
| 30 |
+
self, get_response: Optional[Callable] = ..., cache_timeout: Optional[float] = ..., **kwargs: Any
|
| 31 |
+
) -> None: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/clickjacking.pyi
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from django.http.request import HttpRequest
|
| 2 |
+
from django.http.response import HttpResponse
|
| 3 |
+
from django.utils.deprecation import MiddlewareMixin
|
| 4 |
+
|
| 5 |
+
class XFrameOptionsMiddleware(MiddlewareMixin):
|
| 6 |
+
def process_response(self, request: HttpRequest, response: HttpResponse) -> HttpResponse: ...
|
| 7 |
+
def get_xframe_options_value(self, request: HttpRequest, response: HttpResponse) -> str: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/common.pyi
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Optional
|
| 2 |
+
|
| 3 |
+
from django.http.request import HttpRequest
|
| 4 |
+
from django.http.response import HttpResponseBase, HttpResponsePermanentRedirect
|
| 5 |
+
from django.utils.deprecation import MiddlewareMixin
|
| 6 |
+
|
| 7 |
+
class CommonMiddleware(MiddlewareMixin):
|
| 8 |
+
response_redirect_class: Any = ...
|
| 9 |
+
def process_request(self, request: HttpRequest) -> Optional[HttpResponsePermanentRedirect]: ...
|
| 10 |
+
def should_redirect_with_slash(self, request: HttpRequest) -> bool: ...
|
| 11 |
+
def get_full_path_with_slash(self, request: HttpRequest) -> str: ...
|
| 12 |
+
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
|
| 13 |
+
|
| 14 |
+
class BrokenLinkEmailsMiddleware(MiddlewareMixin):
|
| 15 |
+
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
|
| 16 |
+
def is_internal_request(self, domain: str, referer: str) -> bool: ...
|
| 17 |
+
def is_ignorable_request(self, request: HttpRequest, uri: str, domain: str, referer: str) -> bool: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/csrf.pyi
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable, Dict, Optional, Tuple
|
| 2 |
+
|
| 3 |
+
from django.http.request import HttpRequest
|
| 4 |
+
from django.http.response import HttpResponseBase, HttpResponseForbidden
|
| 5 |
+
from django.utils.deprecation import MiddlewareMixin
|
| 6 |
+
|
| 7 |
+
logger: Any
|
| 8 |
+
REASON_NO_REFERER: str
|
| 9 |
+
REASON_BAD_REFERER: str
|
| 10 |
+
REASON_NO_CSRF_COOKIE: str
|
| 11 |
+
REASON_BAD_TOKEN: str
|
| 12 |
+
REASON_MALFORMED_REFERER: str
|
| 13 |
+
REASON_INSECURE_REFERER: str
|
| 14 |
+
CSRF_SECRET_LENGTH: int
|
| 15 |
+
CSRF_TOKEN_LENGTH: Any
|
| 16 |
+
CSRF_ALLOWED_CHARS: Any
|
| 17 |
+
CSRF_SESSION_KEY: str
|
| 18 |
+
|
| 19 |
+
def get_token(request: HttpRequest) -> str: ...
|
| 20 |
+
def rotate_token(request: HttpRequest) -> None: ...
|
| 21 |
+
|
| 22 |
+
class CsrfViewMiddleware(MiddlewareMixin):
|
| 23 |
+
def process_request(self, request: HttpRequest) -> None: ...
|
| 24 |
+
def process_view(
|
| 25 |
+
self, request: HttpRequest, callback: Optional[Callable], callback_args: Tuple, callback_kwargs: Dict[str, Any]
|
| 26 |
+
) -> Optional[HttpResponseForbidden]: ...
|
| 27 |
+
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
|
| 28 |
+
|
| 29 |
+
def _compare_salted_tokens(request_csrf_token: str, csrf_token: str) -> bool: ...
|
| 30 |
+
def _get_new_csrf_string() -> str: ...
|
| 31 |
+
def _salt_cipher_secret(secret: str) -> str: ...
|
| 32 |
+
def _unsalt_cipher_token(token: str) -> str: ...
|
| 33 |
+
def _get_new_csrf_token() -> str: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/gzip.pyi
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any
|
| 2 |
+
|
| 3 |
+
from django.http.request import HttpRequest
|
| 4 |
+
from django.http.response import HttpResponseBase
|
| 5 |
+
from django.utils.deprecation import MiddlewareMixin
|
| 6 |
+
|
| 7 |
+
re_accepts_gzip: Any
|
| 8 |
+
|
| 9 |
+
class GZipMiddleware(MiddlewareMixin):
|
| 10 |
+
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/http.pyi
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from django.http.request import HttpRequest
|
| 2 |
+
from django.http.response import HttpResponseBase
|
| 3 |
+
from django.utils.deprecation import MiddlewareMixin
|
| 4 |
+
|
| 5 |
+
class ConditionalGetMiddleware(MiddlewareMixin):
|
| 6 |
+
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
|
| 7 |
+
def needs_etag(self, response: HttpResponseBase) -> bool: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/locale.pyi
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any
|
| 2 |
+
|
| 3 |
+
from django.http.request import HttpRequest
|
| 4 |
+
from django.http.response import HttpResponseBase
|
| 5 |
+
from django.utils.deprecation import MiddlewareMixin
|
| 6 |
+
|
| 7 |
+
class LocaleMiddleware(MiddlewareMixin):
|
| 8 |
+
response_redirect_class: Any = ...
|
| 9 |
+
def process_request(self, request: HttpRequest) -> None: ...
|
| 10 |
+
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/middleware/security.pyi
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, List, Optional
|
| 2 |
+
|
| 3 |
+
from django.http.request import HttpRequest
|
| 4 |
+
from django.http.response import HttpResponse, HttpResponsePermanentRedirect
|
| 5 |
+
from django.utils.deprecation import MiddlewareMixin
|
| 6 |
+
|
| 7 |
+
class SecurityMiddleware(MiddlewareMixin):
|
| 8 |
+
sts_seconds: int = ...
|
| 9 |
+
sts_include_subdomains: bool = ...
|
| 10 |
+
sts_preload: bool = ...
|
| 11 |
+
content_type_nosniff: bool = ...
|
| 12 |
+
xss_filter: bool = ...
|
| 13 |
+
redirect: bool = ...
|
| 14 |
+
redirect_host: Optional[str] = ...
|
| 15 |
+
redirect_exempt: List[Any] = ...
|
| 16 |
+
def process_request(self, request: HttpRequest) -> Optional[HttpResponsePermanentRedirect]: ...
|
| 17 |
+
def process_response(self, request: HttpRequest, response: HttpResponse) -> HttpResponse: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/__init__.pyi
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from .testcases import (
|
| 2 |
+
TestCase as TestCase,
|
| 3 |
+
TransactionTestCase as TransactionTestCase,
|
| 4 |
+
SimpleTestCase as SimpleTestCase,
|
| 5 |
+
LiveServerTestCase as LiveServerTestCase,
|
| 6 |
+
skipIfDBFeature as skipIfDBFeature,
|
| 7 |
+
skipUnlessDBFeature as skipUnlessDBFeature,
|
| 8 |
+
skipUnlessAnyDBFeature as skipUnlessAnyDBFeature,
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
from .utils import (
|
| 12 |
+
override_settings as override_settings,
|
| 13 |
+
modify_settings as modify_settings,
|
| 14 |
+
override_script_prefix as override_script_prefix,
|
| 15 |
+
override_system_checks as override_system_checks,
|
| 16 |
+
ignore_warnings as ignore_warnings,
|
| 17 |
+
tag as tag,
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
from .client import Client as Client, RequestFactory as RequestFactory
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/client.pyi
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from io import BytesIO
|
| 2 |
+
from types import TracebackType
|
| 3 |
+
from typing import Any, Dict, List, Optional, Pattern, Tuple, Type, Union
|
| 4 |
+
|
| 5 |
+
from django.contrib.auth.models import AbstractUser
|
| 6 |
+
from django.contrib.sessions.backends.base import SessionBase
|
| 7 |
+
from django.core.handlers.base import BaseHandler
|
| 8 |
+
from django.http.cookie import SimpleCookie
|
| 9 |
+
from django.http.request import HttpRequest
|
| 10 |
+
from django.http.response import HttpResponse, HttpResponseBase
|
| 11 |
+
|
| 12 |
+
from django.core.handlers.wsgi import WSGIRequest
|
| 13 |
+
from json import JSONEncoder
|
| 14 |
+
|
| 15 |
+
BOUNDARY: str = ...
|
| 16 |
+
MULTIPART_CONTENT: str = ...
|
| 17 |
+
CONTENT_TYPE_RE: Pattern = ...
|
| 18 |
+
JSON_CONTENT_TYPE_RE: Pattern = ...
|
| 19 |
+
|
| 20 |
+
class RedirectCycleError(Exception):
|
| 21 |
+
last_response: HttpResponseBase = ...
|
| 22 |
+
redirect_chain: List[Tuple[str, int]] = ...
|
| 23 |
+
def __init__(self, message: str, last_response: HttpResponseBase) -> None: ...
|
| 24 |
+
|
| 25 |
+
class FakePayload:
|
| 26 |
+
read_started: bool = ...
|
| 27 |
+
def __init__(self, content: Optional[Union[bytes, str]] = ...) -> None: ...
|
| 28 |
+
def __len__(self) -> int: ...
|
| 29 |
+
def read(self, num_bytes: int = ...) -> bytes: ...
|
| 30 |
+
def write(self, content: Union[bytes, str]) -> None: ...
|
| 31 |
+
|
| 32 |
+
class ClientHandler(BaseHandler):
|
| 33 |
+
enforce_csrf_checks: bool = ...
|
| 34 |
+
def __init__(self, enforce_csrf_checks: bool = ..., *args: Any, **kwargs: Any) -> None: ...
|
| 35 |
+
def __call__(self, environ: Dict[str, Any]) -> HttpResponseBase: ...
|
| 36 |
+
|
| 37 |
+
def encode_multipart(boundary: str, data: Dict[str, Any]) -> bytes: ...
|
| 38 |
+
def encode_file(boundary: str, key: str, file: Any) -> List[bytes]: ...
|
| 39 |
+
|
| 40 |
+
class RequestFactory:
|
| 41 |
+
json_encoder: Type[JSONEncoder]
|
| 42 |
+
defaults: Dict[str, str]
|
| 43 |
+
cookies: SimpleCookie
|
| 44 |
+
errors: BytesIO
|
| 45 |
+
def __init__(self, *, json_encoder: Type[JSONEncoder] = ..., **defaults: Any) -> None: ...
|
| 46 |
+
def request(self, **request: Any) -> WSGIRequest: ...
|
| 47 |
+
def get(self, path: str, data: Any = ..., secure: bool = ..., **extra: Any) -> WSGIRequest: ...
|
| 48 |
+
def post(
|
| 49 |
+
self, path: str, data: Any = ..., content_type: str = ..., secure: bool = ..., **extra: Any
|
| 50 |
+
) -> WSGIRequest: ...
|
| 51 |
+
def head(self, path: str, data: Any = ..., secure: bool = ..., **extra: Any) -> WSGIRequest: ...
|
| 52 |
+
def trace(self, path: str, secure: bool = ..., **extra: Any) -> WSGIRequest: ...
|
| 53 |
+
def options(
|
| 54 |
+
self,
|
| 55 |
+
path: str,
|
| 56 |
+
data: Union[Dict[str, str], str] = ...,
|
| 57 |
+
content_type: str = ...,
|
| 58 |
+
follow: bool = ...,
|
| 59 |
+
secure: bool = ...,
|
| 60 |
+
**extra: Any
|
| 61 |
+
) -> WSGIRequest: ...
|
| 62 |
+
def put(
|
| 63 |
+
self, path: str, data: Any = ..., content_type: str = ..., secure: bool = ..., **extra: Any
|
| 64 |
+
) -> WSGIRequest: ...
|
| 65 |
+
def patch(
|
| 66 |
+
self, path: str, data: Any = ..., content_type: str = ..., secure: bool = ..., **extra: Any
|
| 67 |
+
) -> WSGIRequest: ...
|
| 68 |
+
def delete(
|
| 69 |
+
self, path: str, data: Any = ..., content_type: str = ..., secure: bool = ..., **extra: Any
|
| 70 |
+
) -> WSGIRequest: ...
|
| 71 |
+
def generic(
|
| 72 |
+
self,
|
| 73 |
+
method: str,
|
| 74 |
+
path: str,
|
| 75 |
+
data: Any = ...,
|
| 76 |
+
content_type: Optional[str] = ...,
|
| 77 |
+
secure: bool = ...,
|
| 78 |
+
**extra: Any
|
| 79 |
+
) -> WSGIRequest: ...
|
| 80 |
+
|
| 81 |
+
class Client(RequestFactory):
|
| 82 |
+
handler: ClientHandler
|
| 83 |
+
raise_request_exception: bool
|
| 84 |
+
exc_info: Optional[Tuple[Type[BaseException], BaseException, TracebackType]]
|
| 85 |
+
def __init__(
|
| 86 |
+
self,
|
| 87 |
+
enforce_csrf_checks: bool = ...,
|
| 88 |
+
raise_request_exception: bool = ...,
|
| 89 |
+
*,
|
| 90 |
+
json_encoder: Type[JSONEncoder] = ...,
|
| 91 |
+
**defaults: Any
|
| 92 |
+
) -> None: ...
|
| 93 |
+
# Silence type warnings, since this class overrides arguments and return types in an unsafe manner.
|
| 94 |
+
def request(self, **request: Any) -> HttpResponse: ... # type: ignore
|
| 95 |
+
def get( # type: ignore
|
| 96 |
+
self, path: str, data: Any = ..., follow: bool = ..., secure: bool = ..., **extra: Any
|
| 97 |
+
) -> HttpResponse: ... # type: ignore
|
| 98 |
+
def post( # type: ignore
|
| 99 |
+
self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any
|
| 100 |
+
) -> HttpResponse: ... # type: ignore
|
| 101 |
+
def head( # type: ignore
|
| 102 |
+
self, path: str, data: Any = ..., follow: bool = ..., secure: bool = ..., **extra: Any
|
| 103 |
+
) -> HttpResponse: ... # type: ignore
|
| 104 |
+
def trace( # type: ignore
|
| 105 |
+
self, path: str, follow: bool = ..., secure: bool = ..., **extra: Any
|
| 106 |
+
) -> HttpResponse: ... # type: ignore
|
| 107 |
+
def options( # type: ignore
|
| 108 |
+
self,
|
| 109 |
+
path: str,
|
| 110 |
+
data: Union[Dict[str, str], str] = ...,
|
| 111 |
+
content_type: str = ...,
|
| 112 |
+
follow: bool = ...,
|
| 113 |
+
secure: bool = ...,
|
| 114 |
+
**extra: Any
|
| 115 |
+
) -> HttpResponse: ... # type: ignore
|
| 116 |
+
def put( # type: ignore
|
| 117 |
+
self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any
|
| 118 |
+
) -> HttpResponse: ... # type: ignore
|
| 119 |
+
def patch( # type: ignore
|
| 120 |
+
self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any
|
| 121 |
+
) -> HttpResponse: ... # type: ignore
|
| 122 |
+
def delete( # type: ignore
|
| 123 |
+
self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any
|
| 124 |
+
) -> HttpResponse: ... # type: ignore
|
| 125 |
+
def store_exc_info(self, **kwargs: Any) -> None: ...
|
| 126 |
+
@property
|
| 127 |
+
def session(self) -> SessionBase: ...
|
| 128 |
+
def login(self, **credentials: Any) -> bool: ...
|
| 129 |
+
def force_login(self, user: AbstractUser, backend: Optional[str] = ...) -> None: ...
|
| 130 |
+
def logout(self) -> None: ...
|
| 131 |
+
|
| 132 |
+
def conditional_content_removal(request: HttpRequest, response: HttpResponseBase) -> HttpResponse: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/html.pyi
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from html.parser import HTMLParser
|
| 2 |
+
from typing import Any, List, Optional, Sequence, Tuple, TypeVar, Union
|
| 3 |
+
|
| 4 |
+
_Self = TypeVar("_Self")
|
| 5 |
+
|
| 6 |
+
WHITESPACE: Any
|
| 7 |
+
|
| 8 |
+
def normalize_whitespace(string: str) -> str: ...
|
| 9 |
+
|
| 10 |
+
_ElementAttribute = Tuple[str, Optional[str]]
|
| 11 |
+
|
| 12 |
+
class Element:
|
| 13 |
+
name: Optional[str] = ...
|
| 14 |
+
attributes: List[_ElementAttribute] = ...
|
| 15 |
+
children: List[Any] = ...
|
| 16 |
+
def __init__(self, name: Optional[str], attributes: Sequence[_ElementAttribute]) -> None: ...
|
| 17 |
+
def append(self, element: Union[Element, str]) -> None: ...
|
| 18 |
+
def finalize(self) -> None: ...
|
| 19 |
+
def __contains__(self, element: Union[Element, str]) -> bool: ...
|
| 20 |
+
def count(self, element: Union[Element, str]) -> int: ...
|
| 21 |
+
def __getitem__(self, key: int) -> Any: ...
|
| 22 |
+
|
| 23 |
+
class RootElement(Element):
|
| 24 |
+
def __init__(self) -> None: ...
|
| 25 |
+
|
| 26 |
+
class HTMLParseError(Exception): ...
|
| 27 |
+
|
| 28 |
+
class Parser(HTMLParser):
|
| 29 |
+
SELF_CLOSING_TAGS: Any = ...
|
| 30 |
+
root: Any = ...
|
| 31 |
+
open_tags: Any = ...
|
| 32 |
+
element_positions: Any = ...
|
| 33 |
+
def __init__(self) -> None: ...
|
| 34 |
+
def format_position(self, position: Any = ..., element: Any = ...) -> str: ...
|
| 35 |
+
@property
|
| 36 |
+
def current(self) -> Element: ...
|
| 37 |
+
|
| 38 |
+
def parse_html(html: str) -> Element: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/runner.pyi
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import logging
|
| 2 |
+
from argparse import ArgumentParser
|
| 3 |
+
from io import StringIO
|
| 4 |
+
from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, Type
|
| 5 |
+
from unittest import TestCase, TestSuite, TextTestResult
|
| 6 |
+
|
| 7 |
+
from django.db.backends.base.base import BaseDatabaseWrapper
|
| 8 |
+
from django.test.testcases import SimpleTestCase, TestCase
|
| 9 |
+
from django.utils.datastructures import OrderedSet
|
| 10 |
+
|
| 11 |
+
class DebugSQLTextTestResult(TextTestResult):
|
| 12 |
+
buffer: bool
|
| 13 |
+
descriptions: bool
|
| 14 |
+
dots: bool
|
| 15 |
+
expectedFailures: List[Any]
|
| 16 |
+
failfast: bool
|
| 17 |
+
shouldStop: bool
|
| 18 |
+
showAll: bool
|
| 19 |
+
skipped: List[Any]
|
| 20 |
+
tb_locals: bool
|
| 21 |
+
testsRun: int
|
| 22 |
+
unexpectedSuccesses: List[Any]
|
| 23 |
+
logger: logging.Logger = ...
|
| 24 |
+
def __init__(self, stream: Any, descriptions: bool, verbosity: int) -> None: ...
|
| 25 |
+
debug_sql_stream: StringIO = ...
|
| 26 |
+
handler: logging.StreamHandler = ...
|
| 27 |
+
def startTest(self, test: TestCase) -> None: ...
|
| 28 |
+
def stopTest(self, test: TestCase) -> None: ...
|
| 29 |
+
def addError(self, test: Any, err: Any) -> None: ...
|
| 30 |
+
def addFailure(self, test: Any, err: Any) -> None: ...
|
| 31 |
+
|
| 32 |
+
class RemoteTestResult:
|
| 33 |
+
events: List[Any] = ...
|
| 34 |
+
failfast: bool = ...
|
| 35 |
+
shouldStop: bool = ...
|
| 36 |
+
testsRun: int = ...
|
| 37 |
+
def __init__(self) -> None: ...
|
| 38 |
+
@property
|
| 39 |
+
def test_index(self): ...
|
| 40 |
+
def check_picklable(self, test: Any, err: Any) -> None: ...
|
| 41 |
+
def _confirm_picklable(self, obj: Any) -> None: ...
|
| 42 |
+
def check_subtest_picklable(self, test: Any, subtest: Any) -> None: ...
|
| 43 |
+
def stop_if_failfast(self) -> None: ...
|
| 44 |
+
def stop(self) -> None: ...
|
| 45 |
+
def startTestRun(self) -> None: ...
|
| 46 |
+
def stopTestRun(self) -> None: ...
|
| 47 |
+
def startTest(self, test: Any) -> None: ...
|
| 48 |
+
def stopTest(self, test: Any) -> None: ...
|
| 49 |
+
def addError(self, test: Any, err: Any) -> None: ...
|
| 50 |
+
def addFailure(self, test: Any, err: Any) -> None: ...
|
| 51 |
+
def addSubTest(self, test: Any, subtest: Any, err: Any) -> None: ...
|
| 52 |
+
def addSuccess(self, test: Any) -> None: ...
|
| 53 |
+
def addSkip(self, test: Any, reason: Any) -> None: ...
|
| 54 |
+
def addExpectedFailure(self, test: Any, err: Any) -> None: ...
|
| 55 |
+
def addUnexpectedSuccess(self, test: Any) -> None: ...
|
| 56 |
+
|
| 57 |
+
class RemoteTestRunner:
|
| 58 |
+
resultclass: Any = ...
|
| 59 |
+
failfast: Any = ...
|
| 60 |
+
def __init__(self, failfast: bool = ..., resultclass: Optional[Any] = ...) -> None: ...
|
| 61 |
+
def run(self, test: Any): ...
|
| 62 |
+
|
| 63 |
+
def default_test_processes() -> int: ...
|
| 64 |
+
|
| 65 |
+
class ParallelTestSuite(TestSuite):
|
| 66 |
+
init_worker: Any = ...
|
| 67 |
+
run_subsuite: Any = ...
|
| 68 |
+
runner_class: Any = ...
|
| 69 |
+
subsuites: Any = ...
|
| 70 |
+
processes: Any = ...
|
| 71 |
+
failfast: Any = ...
|
| 72 |
+
def __init__(self, suite: Any, processes: Any, failfast: bool = ...) -> None: ...
|
| 73 |
+
def run(self, result: Any): ...
|
| 74 |
+
|
| 75 |
+
class DiscoverRunner:
|
| 76 |
+
test_suite: Any = ...
|
| 77 |
+
parallel_test_suite: Any = ...
|
| 78 |
+
test_runner: Any = ...
|
| 79 |
+
test_loader: Any = ...
|
| 80 |
+
reorder_by: Any = ...
|
| 81 |
+
pattern: Optional[str] = ...
|
| 82 |
+
top_level: None = ...
|
| 83 |
+
verbosity: int = ...
|
| 84 |
+
interactive: bool = ...
|
| 85 |
+
failfast: bool = ...
|
| 86 |
+
keepdb: bool = ...
|
| 87 |
+
reverse: bool = ...
|
| 88 |
+
debug_mode: bool = ...
|
| 89 |
+
debug_sql: bool = ...
|
| 90 |
+
parallel: int = ...
|
| 91 |
+
tags: Set[str] = ...
|
| 92 |
+
exclude_tags: Set[str] = ...
|
| 93 |
+
def __init__(
|
| 94 |
+
self,
|
| 95 |
+
pattern: Optional[str] = ...,
|
| 96 |
+
top_level: None = ...,
|
| 97 |
+
verbosity: int = ...,
|
| 98 |
+
interactive: bool = ...,
|
| 99 |
+
failfast: bool = ...,
|
| 100 |
+
keepdb: bool = ...,
|
| 101 |
+
reverse: bool = ...,
|
| 102 |
+
debug_mode: bool = ...,
|
| 103 |
+
debug_sql: bool = ...,
|
| 104 |
+
parallel: int = ...,
|
| 105 |
+
tags: Optional[List[str]] = ...,
|
| 106 |
+
exclude_tags: Optional[List[str]] = ...,
|
| 107 |
+
**kwargs: Any
|
| 108 |
+
) -> None: ...
|
| 109 |
+
@classmethod
|
| 110 |
+
def add_arguments(cls, parser: ArgumentParser) -> None: ...
|
| 111 |
+
def setup_test_environment(self, **kwargs: Any) -> None: ...
|
| 112 |
+
def build_suite(
|
| 113 |
+
self, test_labels: Sequence[str] = ..., extra_tests: Optional[List[Any]] = ..., **kwargs: Any
|
| 114 |
+
) -> TestSuite: ...
|
| 115 |
+
def setup_databases(self, **kwargs: Any) -> List[Tuple[BaseDatabaseWrapper, str, bool]]: ...
|
| 116 |
+
def get_resultclass(self) -> Optional[Type[DebugSQLTextTestResult]]: ...
|
| 117 |
+
def get_test_runner_kwargs(self) -> Dict[str, Optional[int]]: ...
|
| 118 |
+
def run_checks(self) -> None: ...
|
| 119 |
+
def run_suite(self, suite: TestSuite, **kwargs: Any) -> TextTestResult: ...
|
| 120 |
+
def teardown_databases(self, old_config: List[Tuple[BaseDatabaseWrapper, str, bool]], **kwargs: Any) -> None: ...
|
| 121 |
+
def teardown_test_environment(self, **kwargs: Any) -> None: ...
|
| 122 |
+
def suite_result(self, suite: TestSuite, result: TextTestResult, **kwargs: Any) -> int: ...
|
| 123 |
+
def run_tests(self, test_labels: List[str], extra_tests: List[Any] = ..., **kwargs: Any) -> int: ...
|
| 124 |
+
|
| 125 |
+
def is_discoverable(label: str) -> bool: ...
|
| 126 |
+
def reorder_suite(
|
| 127 |
+
suite: TestSuite, classes: Tuple[Type[TestCase], Type[SimpleTestCase]], reverse: bool = ...
|
| 128 |
+
) -> TestSuite: ...
|
| 129 |
+
def partition_suite_by_type(
|
| 130 |
+
suite: TestSuite, classes: Tuple[Type[TestCase], Type[SimpleTestCase]], bins: List[OrderedSet], reverse: bool = ...
|
| 131 |
+
) -> None: ...
|
| 132 |
+
def partition_suite_by_case(suite: Any): ...
|
| 133 |
+
def filter_tests_by_tags(suite: TestSuite, tags: Set[str], exclude_tags: Set[str]) -> TestSuite: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/selenium.pyi
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any
|
| 2 |
+
|
| 3 |
+
from django.test import LiveServerTestCase
|
| 4 |
+
|
| 5 |
+
class SeleniumTestCaseBase:
|
| 6 |
+
browsers: Any = ...
|
| 7 |
+
browser: Any = ...
|
| 8 |
+
@classmethod
|
| 9 |
+
def import_webdriver(cls, browser: Any): ...
|
| 10 |
+
def create_webdriver(self): ...
|
| 11 |
+
|
| 12 |
+
class SeleniumTestCase(LiveServerTestCase):
|
| 13 |
+
implicit_wait: int = ...
|
| 14 |
+
def disable_implicit_wait(self) -> None: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/signals.pyi
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any
|
| 2 |
+
from django.core.signals import setting_changed as setting_changed # noqa: F401
|
| 3 |
+
|
| 4 |
+
template_rendered: Any
|
| 5 |
+
COMPLEX_OVERRIDE_SETTINGS: Any
|
| 6 |
+
|
| 7 |
+
def clear_cache_handlers(**kwargs: Any) -> None: ...
|
| 8 |
+
def update_installed_apps(**kwargs: Any) -> None: ...
|
| 9 |
+
def update_connections_time_zone(**kwargs: Any) -> None: ...
|
| 10 |
+
def clear_routers_cache(**kwargs: Any) -> None: ...
|
| 11 |
+
def reset_template_engines(**kwargs: Any) -> None: ...
|
| 12 |
+
def clear_serializers_cache(**kwargs: Any) -> None: ...
|
| 13 |
+
def language_changed(**kwargs: Any) -> None: ...
|
| 14 |
+
def localize_settings_changed(**kwargs: Any) -> None: ...
|
| 15 |
+
def file_storage_changed(**kwargs: Any) -> None: ...
|
| 16 |
+
def complex_setting_changed(**kwargs: Any) -> None: ...
|
| 17 |
+
def root_urlconf_changed(**kwargs: Any) -> None: ...
|
| 18 |
+
def static_storage_changed(**kwargs: Any) -> None: ...
|
| 19 |
+
def static_finders_changed(**kwargs: Any) -> None: ...
|
| 20 |
+
def auth_password_validators_changed(**kwargs: Any) -> None: ...
|
| 21 |
+
def user_model_swapped(**kwargs: Any) -> None: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/testcases.pyi
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import threading
|
| 2 |
+
import unittest
|
| 3 |
+
from datetime import date
|
| 4 |
+
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union, ClassVar, overload
|
| 5 |
+
|
| 6 |
+
from django.core.exceptions import ImproperlyConfigured
|
| 7 |
+
from django.core.handlers.wsgi import WSGIHandler
|
| 8 |
+
from django.core.servers.basehttp import ThreadedWSGIServer, WSGIRequestHandler
|
| 9 |
+
from django.db.backends.sqlite3.base import DatabaseWrapper
|
| 10 |
+
from django.db.models.base import Model
|
| 11 |
+
from django.db.models.query import QuerySet, RawQuerySet
|
| 12 |
+
from django.forms.fields import EmailField
|
| 13 |
+
from django.http.response import HttpResponse, HttpResponseBase
|
| 14 |
+
from django.template.base import Template
|
| 15 |
+
from django.test.client import Client
|
| 16 |
+
from django.test.utils import CaptureQueriesContext, ContextList
|
| 17 |
+
from django.utils.safestring import SafeText
|
| 18 |
+
from django.db import connections as connections # noqa: F401
|
| 19 |
+
|
| 20 |
+
class _AssertNumQueriesContext(CaptureQueriesContext):
|
| 21 |
+
test_case: SimpleTestCase = ...
|
| 22 |
+
num: int = ...
|
| 23 |
+
def __init__(self, test_case: Any, num: Any, connection: Any) -> None: ...
|
| 24 |
+
|
| 25 |
+
class _AssertTemplateUsedContext:
|
| 26 |
+
test_case: SimpleTestCase = ...
|
| 27 |
+
template_name: str = ...
|
| 28 |
+
rendered_templates: List[Template] = ...
|
| 29 |
+
rendered_template_names: List[str] = ...
|
| 30 |
+
context: ContextList = ...
|
| 31 |
+
def __init__(self, test_case: Any, template_name: Any) -> None: ...
|
| 32 |
+
def on_template_render(self, sender: Any, signal: Any, template: Any, context: Any, **kwargs: Any) -> None: ...
|
| 33 |
+
def test(self): ...
|
| 34 |
+
def message(self): ...
|
| 35 |
+
def __enter__(self): ...
|
| 36 |
+
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): ...
|
| 37 |
+
|
| 38 |
+
class _AssertTemplateNotUsedContext(_AssertTemplateUsedContext): ...
|
| 39 |
+
|
| 40 |
+
class _CursorFailure:
|
| 41 |
+
cls_name: str = ...
|
| 42 |
+
wrapped: Callable = ...
|
| 43 |
+
def __init__(self, cls_name: Any, wrapped: Any) -> None: ...
|
| 44 |
+
def __call__(self) -> None: ...
|
| 45 |
+
|
| 46 |
+
class SimpleTestCase(unittest.TestCase):
|
| 47 |
+
client_class: Any = ...
|
| 48 |
+
client: Client
|
| 49 |
+
allow_database_queries: bool = ...
|
| 50 |
+
# TODO: str -> Literal['__all__']
|
| 51 |
+
databases: Union[Set[str], str] = ...
|
| 52 |
+
def __call__(self, result: Optional[unittest.TestResult] = ...) -> None: ...
|
| 53 |
+
def settings(self, **kwargs: Any) -> Any: ...
|
| 54 |
+
def modify_settings(self, **kwargs: Any) -> Any: ...
|
| 55 |
+
def assertRedirects(
|
| 56 |
+
self,
|
| 57 |
+
response: HttpResponse,
|
| 58 |
+
expected_url: str,
|
| 59 |
+
status_code: int = ...,
|
| 60 |
+
target_status_code: int = ...,
|
| 61 |
+
msg_prefix: str = ...,
|
| 62 |
+
fetch_redirect_response: bool = ...,
|
| 63 |
+
) -> None: ...
|
| 64 |
+
def assertContains(
|
| 65 |
+
self,
|
| 66 |
+
response: HttpResponseBase,
|
| 67 |
+
text: Union[bytes, int, str],
|
| 68 |
+
count: Optional[int] = ...,
|
| 69 |
+
status_code: int = ...,
|
| 70 |
+
msg_prefix: str = ...,
|
| 71 |
+
html: bool = ...,
|
| 72 |
+
) -> None: ...
|
| 73 |
+
def assertNotContains(
|
| 74 |
+
self,
|
| 75 |
+
response: HttpResponse,
|
| 76 |
+
text: Union[bytes, str],
|
| 77 |
+
status_code: int = ...,
|
| 78 |
+
msg_prefix: str = ...,
|
| 79 |
+
html: bool = ...,
|
| 80 |
+
) -> None: ...
|
| 81 |
+
def assertFormError(
|
| 82 |
+
self,
|
| 83 |
+
response: HttpResponse,
|
| 84 |
+
form: str,
|
| 85 |
+
field: Optional[str],
|
| 86 |
+
errors: Union[List[str], str],
|
| 87 |
+
msg_prefix: str = ...,
|
| 88 |
+
) -> None: ...
|
| 89 |
+
def assertFormsetError(
|
| 90 |
+
self,
|
| 91 |
+
response: HttpResponse,
|
| 92 |
+
formset: str,
|
| 93 |
+
form_index: Optional[int],
|
| 94 |
+
field: Optional[str],
|
| 95 |
+
errors: Union[List[str], str],
|
| 96 |
+
msg_prefix: str = ...,
|
| 97 |
+
) -> None: ...
|
| 98 |
+
def assertTemplateUsed(
|
| 99 |
+
self,
|
| 100 |
+
response: Optional[Union[HttpResponse, str]] = ...,
|
| 101 |
+
template_name: Optional[str] = ...,
|
| 102 |
+
msg_prefix: str = ...,
|
| 103 |
+
count: Optional[int] = ...,
|
| 104 |
+
) -> Optional[_AssertTemplateUsedContext]: ...
|
| 105 |
+
def assertTemplateNotUsed(
|
| 106 |
+
self, response: Union[HttpResponse, str] = ..., template_name: Optional[str] = ..., msg_prefix: str = ...
|
| 107 |
+
) -> Optional[_AssertTemplateNotUsedContext]: ...
|
| 108 |
+
def assertRaisesMessage(
|
| 109 |
+
self, expected_exception: Type[Exception], expected_message: str, *args: Any, **kwargs: Any
|
| 110 |
+
) -> Any: ...
|
| 111 |
+
def assertWarnsMessage(
|
| 112 |
+
self, expected_warning: Type[Exception], expected_message: str, *args: Any, **kwargs: Any
|
| 113 |
+
) -> Any: ...
|
| 114 |
+
def assertFieldOutput(
|
| 115 |
+
self,
|
| 116 |
+
fieldclass: Type[EmailField],
|
| 117 |
+
valid: Dict[str, str],
|
| 118 |
+
invalid: Dict[str, List[str]],
|
| 119 |
+
field_args: None = ...,
|
| 120 |
+
field_kwargs: None = ...,
|
| 121 |
+
empty_value: str = ...,
|
| 122 |
+
) -> Any: ...
|
| 123 |
+
def assertHTMLEqual(self, html1: str, html2: str, msg: Optional[str] = ...) -> None: ...
|
| 124 |
+
def assertHTMLNotEqual(self, html1: str, html2: str, msg: Optional[str] = ...) -> None: ...
|
| 125 |
+
def assertInHTML(
|
| 126 |
+
self, needle: str, haystack: SafeText, count: Optional[int] = ..., msg_prefix: str = ...
|
| 127 |
+
) -> None: ...
|
| 128 |
+
def assertJSONEqual(
|
| 129 |
+
self,
|
| 130 |
+
raw: str,
|
| 131 |
+
expected_data: Union[Dict[str, Any], List[Any], str, int, float, bool, None],
|
| 132 |
+
msg: Optional[str] = ...,
|
| 133 |
+
) -> None: ...
|
| 134 |
+
def assertJSONNotEqual(
|
| 135 |
+
self,
|
| 136 |
+
raw: str,
|
| 137 |
+
expected_data: Union[Dict[str, Any], List[Any], str, int, float, bool, None],
|
| 138 |
+
msg: Optional[str] = ...,
|
| 139 |
+
) -> None: ...
|
| 140 |
+
def assertXMLEqual(self, xml1: str, xml2: str, msg: Optional[str] = ...) -> None: ...
|
| 141 |
+
def assertXMLNotEqual(self, xml1: str, xml2: str, msg: Optional[str] = ...) -> None: ...
|
| 142 |
+
|
| 143 |
+
class TransactionTestCase(SimpleTestCase):
|
| 144 |
+
reset_sequences: bool = ...
|
| 145 |
+
available_apps: Any = ...
|
| 146 |
+
fixtures: Any = ...
|
| 147 |
+
multi_db: bool = ...
|
| 148 |
+
serialized_rollback: bool = ...
|
| 149 |
+
def assertQuerysetEqual(
|
| 150 |
+
self,
|
| 151 |
+
qs: Union[Iterator[Any], List[Model], QuerySet, RawQuerySet],
|
| 152 |
+
values: Union[List[None], List[Tuple[str, str]], List[date], List[int], List[str], Set[str], QuerySet],
|
| 153 |
+
transform: Union[Callable, Type[str]] = ...,
|
| 154 |
+
ordered: bool = ...,
|
| 155 |
+
msg: Optional[str] = ...,
|
| 156 |
+
) -> None: ...
|
| 157 |
+
@overload
|
| 158 |
+
def assertNumQueries(
|
| 159 |
+
self, num: int, func: Callable[..., Any], *args: Any, using: str = ..., **kwargs: Any
|
| 160 |
+
) -> None: ...
|
| 161 |
+
@overload
|
| 162 |
+
def assertNumQueries(
|
| 163 |
+
self, num: int, func: None = ..., *args: Any, using: str = ..., **kwargs: Any
|
| 164 |
+
) -> _AssertNumQueriesContext: ...
|
| 165 |
+
|
| 166 |
+
class TestCase(TransactionTestCase):
|
| 167 |
+
@classmethod
|
| 168 |
+
def setUpTestData(cls) -> None: ...
|
| 169 |
+
|
| 170 |
+
class CheckCondition:
|
| 171 |
+
conditions: Tuple[Tuple[Callable, str]] = ...
|
| 172 |
+
def __init__(self, *conditions: Any) -> None: ...
|
| 173 |
+
def add_condition(self, condition: Callable, reason: str) -> CheckCondition: ...
|
| 174 |
+
def __get__(self, instance: None, cls: Type[TransactionTestCase] = ...) -> bool: ...
|
| 175 |
+
|
| 176 |
+
def skipIfDBFeature(*features: Any) -> Callable: ...
|
| 177 |
+
def skipUnlessDBFeature(*features: Any) -> Callable: ...
|
| 178 |
+
def skipUnlessAnyDBFeature(*features: Any) -> Callable: ...
|
| 179 |
+
|
| 180 |
+
class QuietWSGIRequestHandler(WSGIRequestHandler): ...
|
| 181 |
+
|
| 182 |
+
class FSFilesHandler(WSGIHandler):
|
| 183 |
+
application: Any = ...
|
| 184 |
+
base_url: Any = ...
|
| 185 |
+
def __init__(self, application: Any) -> None: ...
|
| 186 |
+
def file_path(self, url: Any): ...
|
| 187 |
+
def serve(self, request: Any): ...
|
| 188 |
+
|
| 189 |
+
class _StaticFilesHandler(FSFilesHandler):
|
| 190 |
+
def get_base_dir(self): ...
|
| 191 |
+
def get_base_url(self): ...
|
| 192 |
+
|
| 193 |
+
class _MediaFilesHandler(FSFilesHandler):
|
| 194 |
+
def get_base_dir(self): ...
|
| 195 |
+
def get_base_url(self): ...
|
| 196 |
+
|
| 197 |
+
class LiveServerThread(threading.Thread):
|
| 198 |
+
host: str = ...
|
| 199 |
+
port: int = ...
|
| 200 |
+
is_ready: threading.Event = ...
|
| 201 |
+
error: Optional[ImproperlyConfigured] = ...
|
| 202 |
+
static_handler: Type[WSGIHandler] = ...
|
| 203 |
+
connections_override: Dict[str, Any] = ...
|
| 204 |
+
def __init__(
|
| 205 |
+
self,
|
| 206 |
+
host: str,
|
| 207 |
+
static_handler: Type[WSGIHandler],
|
| 208 |
+
connections_override: Dict[str, DatabaseWrapper] = ...,
|
| 209 |
+
port: int = ...,
|
| 210 |
+
) -> None: ...
|
| 211 |
+
httpd: ThreadedWSGIServer = ...
|
| 212 |
+
def terminate(self) -> None: ...
|
| 213 |
+
|
| 214 |
+
class LiveServerTestCase(TransactionTestCase):
|
| 215 |
+
live_server_url: ClassVar[str]
|
| 216 |
+
host: str = ...
|
| 217 |
+
port: int = ...
|
| 218 |
+
server_thread_class: Type[Any] = ...
|
| 219 |
+
server_thread: Any
|
| 220 |
+
static_handler: Any = ...
|
| 221 |
+
|
| 222 |
+
class SerializeMixin:
|
| 223 |
+
lockfile: Any = ...
|
| 224 |
+
@classmethod
|
| 225 |
+
def setUpClass(cls) -> None: ...
|
| 226 |
+
@classmethod
|
| 227 |
+
def tearDownClass(cls) -> None: ...
|
| 228 |
+
|
| 229 |
+
def connections_support_transactions() -> bool: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/test/utils.pyi
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import decimal
|
| 2 |
+
from contextlib import contextmanager
|
| 3 |
+
from decimal import Decimal
|
| 4 |
+
from io import StringIO
|
| 5 |
+
from typing import (
|
| 6 |
+
Any,
|
| 7 |
+
Callable,
|
| 8 |
+
Dict,
|
| 9 |
+
Iterable,
|
| 10 |
+
Iterator,
|
| 11 |
+
List,
|
| 12 |
+
Mapping,
|
| 13 |
+
Optional,
|
| 14 |
+
Set,
|
| 15 |
+
Tuple,
|
| 16 |
+
Type,
|
| 17 |
+
Union,
|
| 18 |
+
ContextManager,
|
| 19 |
+
TypeVar,
|
| 20 |
+
)
|
| 21 |
+
|
| 22 |
+
from django.apps.registry import Apps
|
| 23 |
+
from django.core.checks.registry import CheckRegistry
|
| 24 |
+
from django.db.models.lookups import Lookup, Transform
|
| 25 |
+
from django.db.models.query_utils import RegisterLookupMixin
|
| 26 |
+
from django.test.runner import DiscoverRunner
|
| 27 |
+
from django.test.testcases import SimpleTestCase
|
| 28 |
+
|
| 29 |
+
from django.conf import LazySettings, Settings
|
| 30 |
+
|
| 31 |
+
_TestClass = Type[SimpleTestCase]
|
| 32 |
+
_DecoratedTest = Union[Callable, _TestClass]
|
| 33 |
+
_C = TypeVar("_C", bound=Callable) # Any callable
|
| 34 |
+
|
| 35 |
+
TZ_SUPPORT: bool = ...
|
| 36 |
+
|
| 37 |
+
class Approximate:
|
| 38 |
+
val: Union[decimal.Decimal, float] = ...
|
| 39 |
+
places: int = ...
|
| 40 |
+
def __init__(self, val: Union[Decimal, float], places: int = ...) -> None: ...
|
| 41 |
+
|
| 42 |
+
class ContextList(list):
|
| 43 |
+
def get(self, key: str, default: Optional[str] = ...) -> str: ...
|
| 44 |
+
def keys(self) -> Set[str]: ...
|
| 45 |
+
|
| 46 |
+
class _TestState: ...
|
| 47 |
+
|
| 48 |
+
def setup_test_environment(debug: Optional[bool] = ...) -> None: ...
|
| 49 |
+
def teardown_test_environment() -> None: ...
|
| 50 |
+
def get_runner(settings: LazySettings, test_runner_class: Optional[str] = ...) -> Type[DiscoverRunner]: ...
|
| 51 |
+
|
| 52 |
+
class TestContextDecorator:
|
| 53 |
+
attr_name: Optional[str] = ...
|
| 54 |
+
kwarg_name: Optional[str] = ...
|
| 55 |
+
def __init__(self, attr_name: Optional[str] = ..., kwarg_name: Optional[str] = ...) -> None: ...
|
| 56 |
+
def enable(self) -> Any: ...
|
| 57 |
+
def disable(self) -> None: ...
|
| 58 |
+
def __enter__(self) -> Optional[Apps]: ...
|
| 59 |
+
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
|
| 60 |
+
def decorate_class(self, cls: _TestClass) -> _TestClass: ...
|
| 61 |
+
def decorate_callable(self, func: _C) -> _C: ...
|
| 62 |
+
def __call__(self, decorated: _DecoratedTest) -> Any: ...
|
| 63 |
+
|
| 64 |
+
class override_settings(TestContextDecorator):
|
| 65 |
+
options: Dict[str, Any] = ...
|
| 66 |
+
def __init__(self, **kwargs: Any) -> None: ...
|
| 67 |
+
wrapped: Settings = ...
|
| 68 |
+
def save_options(self, test_func: _DecoratedTest) -> None: ...
|
| 69 |
+
def decorate_class(self, cls: type) -> type: ...
|
| 70 |
+
|
| 71 |
+
class modify_settings(override_settings):
|
| 72 |
+
wrapped: Settings
|
| 73 |
+
operations: List[Tuple[str, Dict[str, Union[List[str], str]]]] = ...
|
| 74 |
+
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
| 75 |
+
def save_options(self, test_func: _DecoratedTest) -> None: ...
|
| 76 |
+
options: Dict[str, List[Union[Tuple[str, str], str]]] = ...
|
| 77 |
+
|
| 78 |
+
class override_system_checks(TestContextDecorator):
|
| 79 |
+
registry: CheckRegistry = ...
|
| 80 |
+
new_checks: List[Callable] = ...
|
| 81 |
+
deployment_checks: Optional[List[Callable]] = ...
|
| 82 |
+
def __init__(self, new_checks: List[Callable], deployment_checks: Optional[List[Callable]] = ...) -> None: ...
|
| 83 |
+
old_checks: Set[Callable] = ...
|
| 84 |
+
old_deployment_checks: Set[Callable] = ...
|
| 85 |
+
|
| 86 |
+
class CaptureQueriesContext:
|
| 87 |
+
connection: Any = ...
|
| 88 |
+
force_debug_cursor: bool = ...
|
| 89 |
+
initial_queries: int = ...
|
| 90 |
+
final_queries: Optional[int] = ...
|
| 91 |
+
def __init__(self, connection: Any) -> None: ...
|
| 92 |
+
def __iter__(self): ...
|
| 93 |
+
def __getitem__(self, index: int) -> Dict[str, str]: ...
|
| 94 |
+
def __len__(self) -> int: ...
|
| 95 |
+
@property
|
| 96 |
+
def captured_queries(self) -> List[Dict[str, str]]: ...
|
| 97 |
+
def __enter__(self) -> CaptureQueriesContext: ...
|
| 98 |
+
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
|
| 99 |
+
|
| 100 |
+
class ignore_warnings(TestContextDecorator):
|
| 101 |
+
ignore_kwargs: Dict[str, Any] = ...
|
| 102 |
+
filter_func: Callable = ...
|
| 103 |
+
def __init__(self, **kwargs: Any) -> None: ...
|
| 104 |
+
catch_warnings: ContextManager[Optional[list]] = ...
|
| 105 |
+
|
| 106 |
+
requires_tz_support: Any
|
| 107 |
+
|
| 108 |
+
def isolate_lru_cache(lru_cache_object: Callable) -> Iterator[None]: ...
|
| 109 |
+
|
| 110 |
+
class override_script_prefix(TestContextDecorator):
|
| 111 |
+
prefix: str = ...
|
| 112 |
+
def __init__(self, prefix: str) -> None: ...
|
| 113 |
+
old_prefix: str = ...
|
| 114 |
+
|
| 115 |
+
class LoggingCaptureMixin:
|
| 116 |
+
logger: Any = ...
|
| 117 |
+
old_stream: Any = ...
|
| 118 |
+
logger_output: Any = ...
|
| 119 |
+
def setUp(self) -> None: ...
|
| 120 |
+
def tearDown(self) -> None: ...
|
| 121 |
+
|
| 122 |
+
class isolate_apps(TestContextDecorator):
|
| 123 |
+
installed_apps: Tuple[str] = ...
|
| 124 |
+
def __init__(self, *installed_apps: Any, **kwargs: Any) -> None: ...
|
| 125 |
+
old_apps: Apps = ...
|
| 126 |
+
|
| 127 |
+
@contextmanager
|
| 128 |
+
def extend_sys_path(*paths: str) -> Iterator[None]: ...
|
| 129 |
+
@contextmanager
|
| 130 |
+
def captured_output(stream_name) -> Iterator[StringIO]: ...
|
| 131 |
+
@contextmanager
|
| 132 |
+
def captured_stdin() -> Iterator[StringIO]: ...
|
| 133 |
+
@contextmanager
|
| 134 |
+
def captured_stdout() -> Iterator[StringIO]: ...
|
| 135 |
+
@contextmanager
|
| 136 |
+
def captured_stderr() -> Iterator[StringIO]: ...
|
| 137 |
+
@contextmanager
|
| 138 |
+
def freeze_time(t: float) -> Iterator[None]: ...
|
| 139 |
+
def tag(*tags: str): ...
|
| 140 |
+
|
| 141 |
+
_Signature = str
|
| 142 |
+
_TestDatabase = Tuple[str, List[str]]
|
| 143 |
+
|
| 144 |
+
def dependency_ordered(
|
| 145 |
+
test_databases: Iterable[Tuple[_Signature, _TestDatabase]], dependencies: Mapping[str, List[str]]
|
| 146 |
+
) -> List[Tuple[_Signature, _TestDatabase]]: ...
|
| 147 |
+
def get_unique_databases_and_mirrors() -> Tuple[Dict[_Signature, _TestDatabase], Dict[str, Any]]: ...
|
| 148 |
+
def teardown_databases(
|
| 149 |
+
old_config: Iterable[Tuple[Any, str, bool]], verbosity: int, parallel: int = ..., keepdb: bool = ...
|
| 150 |
+
) -> None: ...
|
| 151 |
+
def require_jinja2(test_func: _C) -> _C: ...
|
| 152 |
+
@contextmanager
|
| 153 |
+
def register_lookup(
|
| 154 |
+
field: Type[RegisterLookupMixin], *lookups: Type[Union[Lookup, Transform]], lookup_name: Optional[str] = ...
|
| 155 |
+
) -> Iterator[None]: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/_os.pyi
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from os.path import abspath
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from typing import Any, Union
|
| 4 |
+
|
| 5 |
+
abspathu = abspath
|
| 6 |
+
|
| 7 |
+
def upath(path: Any): ...
|
| 8 |
+
def npath(path: Any): ...
|
| 9 |
+
def safe_join(base: Union[bytes, str], *paths: Any) -> str: ...
|
| 10 |
+
def symlinks_supported() -> Any: ...
|
| 11 |
+
def to_path(value: Union[Path, str]) -> Path: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/crypto.pyi
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from hmac import HMAC
|
| 2 |
+
from typing import Callable, Optional, Union
|
| 3 |
+
|
| 4 |
+
using_sysrandom: bool
|
| 5 |
+
|
| 6 |
+
def salted_hmac(key_salt: str, value: Union[bytes, str], secret: Optional[Union[bytes, str]] = ...) -> HMAC: ...
|
| 7 |
+
def get_random_string(length: int = ..., allowed_chars: str = ...) -> str: ...
|
| 8 |
+
def constant_time_compare(val1: Union[bytes, str], val2: Union[bytes, str]) -> bool: ...
|
| 9 |
+
def pbkdf2(
|
| 10 |
+
password: Union[bytes, str],
|
| 11 |
+
salt: Union[bytes, str],
|
| 12 |
+
iterations: int,
|
| 13 |
+
dklen: int = ...,
|
| 14 |
+
digest: Optional[Callable] = ...,
|
| 15 |
+
) -> bytes: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/inspect.pyi
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Callable, List, Tuple
|
| 2 |
+
|
| 3 |
+
def get_func_args(func: Callable) -> List[str]: ...
|
| 4 |
+
def get_func_full_args(func: Callable) -> List[Tuple[str]]: ...
|
| 5 |
+
def func_accepts_kwargs(func: Callable) -> bool: ...
|
| 6 |
+
def func_accepts_var_args(func: Callable) -> bool: ...
|
| 7 |
+
def method_has_no_args(meth: Callable) -> bool: ...
|
| 8 |
+
def func_supports_parameter(func: Callable, parameter: str) -> bool: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/module_loading.pyi
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any
|
| 2 |
+
|
| 3 |
+
def import_string(dotted_path: str) -> Any: ...
|
| 4 |
+
def autodiscover_modules(*args: Any, **kwargs: Any) -> None: ...
|
| 5 |
+
def module_has_submodule(package: Any, module_name: str) -> bool: ...
|
| 6 |
+
def module_dir(module: Any) -> str: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/six.pyi
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import print_function
|
| 2 |
+
|
| 3 |
+
import types
|
| 4 |
+
import typing
|
| 5 |
+
import unittest
|
| 6 |
+
from typing import (
|
| 7 |
+
Any,
|
| 8 |
+
AnyStr,
|
| 9 |
+
Callable,
|
| 10 |
+
Dict,
|
| 11 |
+
ItemsView,
|
| 12 |
+
Iterable,
|
| 13 |
+
KeysView,
|
| 14 |
+
Mapping,
|
| 15 |
+
NoReturn,
|
| 16 |
+
Optional,
|
| 17 |
+
Pattern,
|
| 18 |
+
Text,
|
| 19 |
+
Tuple,
|
| 20 |
+
Type,
|
| 21 |
+
TypeVar,
|
| 22 |
+
Union,
|
| 23 |
+
ValuesView,
|
| 24 |
+
overload,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
# Exports
|
| 28 |
+
|
| 29 |
+
_T = TypeVar("_T")
|
| 30 |
+
_K = TypeVar("_K")
|
| 31 |
+
_V = TypeVar("_V")
|
| 32 |
+
|
| 33 |
+
# TODO make constant, then move this stub to 2and3
|
| 34 |
+
# https://github.com/python/typeshed/issues/17
|
| 35 |
+
PY2 = False
|
| 36 |
+
PY3 = True
|
| 37 |
+
PY34 = ... # type: bool
|
| 38 |
+
|
| 39 |
+
string_types = (str,)
|
| 40 |
+
integer_types = (int,)
|
| 41 |
+
class_types = (type,)
|
| 42 |
+
text_type = str
|
| 43 |
+
binary_type = bytes
|
| 44 |
+
|
| 45 |
+
MAXSIZE = ... # type: int
|
| 46 |
+
|
| 47 |
+
# def add_move
|
| 48 |
+
# def remove_move
|
| 49 |
+
|
| 50 |
+
def callable(obj: object) -> bool: ...
|
| 51 |
+
def get_unbound_function(unbound: types.FunctionType) -> types.FunctionType: ...
|
| 52 |
+
def create_bound_method(func: types.FunctionType, obj: object) -> types.MethodType: ...
|
| 53 |
+
def create_unbound_method(func: types.FunctionType, cls: type) -> types.FunctionType: ...
|
| 54 |
+
|
| 55 |
+
Iterator = object
|
| 56 |
+
|
| 57 |
+
def get_method_function(meth: types.MethodType) -> types.FunctionType: ...
|
| 58 |
+
def get_method_self(meth: types.MethodType) -> Optional[object]: ...
|
| 59 |
+
def get_function_closure(fun: types.FunctionType) -> Optional[Tuple[types._Cell, ...]]: ...
|
| 60 |
+
def get_function_code(fun: types.FunctionType) -> types.CodeType: ...
|
| 61 |
+
def get_function_defaults(fun: types.FunctionType) -> Optional[Tuple[Any, ...]]: ...
|
| 62 |
+
def get_function_globals(fun: types.FunctionType) -> Dict[str, Any]: ...
|
| 63 |
+
def iterkeys(d: Mapping[_K, _V]) -> typing.Iterator[_K]: ...
|
| 64 |
+
def itervalues(d: Mapping[_K, _V]) -> typing.Iterator[_V]: ...
|
| 65 |
+
def iteritems(d: Mapping[_K, _V]) -> typing.Iterator[Tuple[_K, _V]]: ...
|
| 66 |
+
|
| 67 |
+
# def iterlists
|
| 68 |
+
|
| 69 |
+
def viewkeys(d: Mapping[_K, _V]) -> KeysView[_K]: ...
|
| 70 |
+
def viewvalues(d: Mapping[_K, _V]) -> ValuesView[_V]: ...
|
| 71 |
+
def viewitems(d: Mapping[_K, _V]) -> ItemsView[_K, _V]: ...
|
| 72 |
+
def b(s: str) -> binary_type: ...
|
| 73 |
+
def u(s: str) -> text_type: ...
|
| 74 |
+
|
| 75 |
+
unichr = chr
|
| 76 |
+
|
| 77 |
+
def int2byte(i: int) -> bytes: ...
|
| 78 |
+
def byte2int(bs: binary_type) -> int: ...
|
| 79 |
+
def indexbytes(buf: binary_type, i: int) -> int: ...
|
| 80 |
+
def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...
|
| 81 |
+
def assertCountEqual(
|
| 82 |
+
self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: Optional[str] = ...
|
| 83 |
+
) -> None: ...
|
| 84 |
+
@overload
|
| 85 |
+
def assertRaisesRegex(self: unittest.TestCase, msg: Optional[str] = ...) -> Any: ...
|
| 86 |
+
@overload
|
| 87 |
+
def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ...
|
| 88 |
+
def assertRegex(
|
| 89 |
+
self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = ...
|
| 90 |
+
) -> None: ...
|
| 91 |
+
|
| 92 |
+
exec_ = exec
|
| 93 |
+
|
| 94 |
+
def reraise(
|
| 95 |
+
tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...
|
| 96 |
+
) -> NoReturn: ...
|
| 97 |
+
def raise_from(value: Union[BaseException, Type[BaseException]], from_value: Optional[BaseException]) -> NoReturn: ...
|
| 98 |
+
|
| 99 |
+
print_ = print
|
| 100 |
+
|
| 101 |
+
def with_metaclass(meta: type, *bases: type) -> type: ...
|
| 102 |
+
def add_metaclass(metaclass: type) -> Callable[[_T], _T]: ...
|
| 103 |
+
def ensure_binary(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> bytes: ...
|
| 104 |
+
def ensure_str(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> str: ...
|
| 105 |
+
def ensure_text(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> Text: ...
|
| 106 |
+
def python_2_unicode_compatible(klass: _T) -> _T: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/timesince.pyi
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from datetime import date
|
| 2 |
+
from typing import Any, Optional, Dict
|
| 3 |
+
|
| 4 |
+
TIME_STRINGS: Dict[str, str]
|
| 5 |
+
TIMESINCE_CHUNKS: Any
|
| 6 |
+
|
| 7 |
+
def timesince(
|
| 8 |
+
d: date, now: Optional[date] = ..., reversed: bool = ..., time_strings: Optional[Dict[str, str]] = ...
|
| 9 |
+
) -> str: ...
|
| 10 |
+
def timeuntil(d: date, now: Optional[date] = ..., time_strings: Optional[Dict[str, str]] = ...) -> str: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/translation/__init__.pyi
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import functools
|
| 2 |
+
from contextlib import ContextDecorator
|
| 3 |
+
from typing import Any, Optional, Callable
|
| 4 |
+
|
| 5 |
+
from django.core.handlers.wsgi import WSGIRequest
|
| 6 |
+
|
| 7 |
+
LANGUAGE_SESSION_KEY: str
|
| 8 |
+
|
| 9 |
+
class TranslatorCommentWarning(SyntaxWarning): ...
|
| 10 |
+
|
| 11 |
+
class Trans:
|
| 12 |
+
activate: Callable
|
| 13 |
+
check_for_language: functools._lru_cache_wrapper
|
| 14 |
+
deactivate: Callable
|
| 15 |
+
deactivate_all: Callable
|
| 16 |
+
get_language: Callable
|
| 17 |
+
get_language_bidi: Callable
|
| 18 |
+
get_language_from_path: Callable
|
| 19 |
+
get_language_from_request: Callable
|
| 20 |
+
gettext: Callable
|
| 21 |
+
gettext_noop: Callable
|
| 22 |
+
ngettext: Callable
|
| 23 |
+
npgettext: Callable
|
| 24 |
+
pgettext: Callable
|
| 25 |
+
def __getattr__(self, real_name: Any): ...
|
| 26 |
+
|
| 27 |
+
def gettext_noop(message: str) -> str: ...
|
| 28 |
+
|
| 29 |
+
ugettext_noop = gettext_noop
|
| 30 |
+
|
| 31 |
+
def gettext(message: str) -> str: ...
|
| 32 |
+
|
| 33 |
+
ugettext = gettext
|
| 34 |
+
|
| 35 |
+
def ngettext(singular: str, plural: str, number: float) -> str: ...
|
| 36 |
+
|
| 37 |
+
ungettext = ngettext
|
| 38 |
+
|
| 39 |
+
def pgettext(context: str, message: str) -> str: ...
|
| 40 |
+
def npgettext(context: str, singular: str, plural: str, number: int) -> str: ...
|
| 41 |
+
|
| 42 |
+
gettext_lazy = gettext
|
| 43 |
+
ugettext_lazy = ugettext
|
| 44 |
+
pgettext_lazy = pgettext
|
| 45 |
+
ngettext_lazy = ngettext
|
| 46 |
+
ungettext_lazy = ungettext
|
| 47 |
+
npgettext_lazy = npgettext
|
| 48 |
+
|
| 49 |
+
def activate(language: str) -> None: ...
|
| 50 |
+
def deactivate() -> None: ...
|
| 51 |
+
|
| 52 |
+
class override(ContextDecorator):
|
| 53 |
+
language: Optional[str] = ...
|
| 54 |
+
deactivate: bool = ...
|
| 55 |
+
def __init__(self, language: Optional[str], deactivate: bool = ...) -> None: ...
|
| 56 |
+
old_language: Optional[str] = ...
|
| 57 |
+
def __enter__(self) -> None: ...
|
| 58 |
+
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
|
| 59 |
+
|
| 60 |
+
def get_language() -> Optional[str]: ...
|
| 61 |
+
def get_language_from_path(path: str) -> Optional[str]: ...
|
| 62 |
+
def get_language_bidi() -> bool: ...
|
| 63 |
+
def check_for_language(lang_code: Optional[str]) -> bool: ...
|
| 64 |
+
def to_language(locale: str) -> str: ...
|
| 65 |
+
def to_locale(language: str) -> str: ...
|
| 66 |
+
def get_language_from_request(request: WSGIRequest, check_path: bool = ...) -> str: ...
|
| 67 |
+
def templatize(src: str, **kwargs: Any) -> str: ...
|
| 68 |
+
def deactivate_all() -> None: ...
|
| 69 |
+
def get_supported_language_variant(lang_code: str, strict: bool = ...) -> str: ...
|
| 70 |
+
def get_language_info(lang_code: str) -> Any: ...
|
| 71 |
+
|
| 72 |
+
from . import trans_real as trans_real
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/utils/xmlutils.pyi
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, Optional
|
| 2 |
+
from xml.sax.saxutils import XMLGenerator
|
| 3 |
+
|
| 4 |
+
class UnserializableContentError(ValueError): ...
|
| 5 |
+
|
| 6 |
+
class SimplerXMLGenerator(XMLGenerator):
|
| 7 |
+
def addQuickElement(
|
| 8 |
+
self, name: str, contents: Optional[str] = ..., attrs: Optional[Dict[str, str]] = ...
|
| 9 |
+
) -> None: ...
|
| 10 |
+
def characters(self, content: str) -> None: ...
|
| 11 |
+
def startElement(self, name: str, attrs: Dict[str, str]) -> None: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/__init__.pyi
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
from .generic.base import View as View
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/__init__.pyi
ADDED
|
File without changes
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/cache.pyi
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable, Optional, TypeVar
|
| 2 |
+
|
| 3 |
+
_F = TypeVar("_F", bound=Callable[..., Any])
|
| 4 |
+
|
| 5 |
+
def cache_page(timeout: float, *, cache: Optional[Any] = ..., key_prefix: Optional[Any] = ...) -> Callable: ...
|
| 6 |
+
def cache_control(**kwargs: Any) -> Callable: ...
|
| 7 |
+
def never_cache(view_func: _F) -> _F: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/clickjacking.pyi
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Callable, TypeVar, Any
|
| 2 |
+
|
| 3 |
+
_F = TypeVar("_F", bound=Callable[..., Any])
|
| 4 |
+
|
| 5 |
+
def xframe_options_deny(view_func: _F) -> _F: ...
|
| 6 |
+
def xframe_options_sameorigin(view_func: _F) -> _F: ...
|
| 7 |
+
def xframe_options_exempt(view_func: _F) -> _F: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/csrf.pyi
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable, TypeVar
|
| 2 |
+
|
| 3 |
+
from django.middleware.csrf import CsrfViewMiddleware
|
| 4 |
+
|
| 5 |
+
csrf_protect: Any
|
| 6 |
+
|
| 7 |
+
class _EnsureCsrfToken(CsrfViewMiddleware): ...
|
| 8 |
+
|
| 9 |
+
requires_csrf_token: Any
|
| 10 |
+
|
| 11 |
+
class _EnsureCsrfCookie(CsrfViewMiddleware):
|
| 12 |
+
get_response: None
|
| 13 |
+
def process_view(self, request: Any, callback: Any, callback_args: Any, callback_kwargs: Any): ...
|
| 14 |
+
|
| 15 |
+
ensure_csrf_cookie: Any
|
| 16 |
+
|
| 17 |
+
_F = TypeVar("_F", bound=Callable[..., Any])
|
| 18 |
+
|
| 19 |
+
def csrf_exempt(view_func: _F) -> _F: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/debug.pyi
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable
|
| 2 |
+
|
| 3 |
+
def sensitive_variables(*variables: Any) -> Callable: ...
|
| 4 |
+
def sensitive_post_parameters(*parameters: Any) -> Callable: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/gzip.pyi
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Callable, TypeVar, Any
|
| 2 |
+
|
| 3 |
+
_C = TypeVar("_C", bound=Callable[..., Any])
|
| 4 |
+
|
| 5 |
+
def gzip_page(view_func: _C) -> _C: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/http.pyi
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable, List, Optional, TypeVar
|
| 2 |
+
|
| 3 |
+
_F = TypeVar("_F", bound=Callable[..., Any])
|
| 4 |
+
|
| 5 |
+
def conditional_page(_F) -> _F: ...
|
| 6 |
+
def require_http_methods(request_method_list: List[str]) -> Callable: ...
|
| 7 |
+
def require_GET(_F) -> _F: ...
|
| 8 |
+
def require_POST(_F) -> _F: ...
|
| 9 |
+
def require_safe(_F) -> _F: ...
|
| 10 |
+
def condition(etag_func: Optional[Callable] = ..., last_modified_func: Optional[Callable] = ...) -> Callable: ...
|
| 11 |
+
def etag(etag_func: Callable[..., Any]) -> Callable[[_F], _F]: ...
|
| 12 |
+
def last_modified(last_modified_func: Callable[..., Any]) -> Callable[[_F], _F]: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/decorators/vary.pyi
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable, TypeVar
|
| 2 |
+
|
| 3 |
+
_F = TypeVar("_F", bound=Callable[..., Any])
|
| 4 |
+
|
| 5 |
+
def vary_on_headers(*headers: Any) -> Callable: ...
|
| 6 |
+
def vary_on_cookie(func: _F) -> _F: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/base.pyi
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable, Dict, List, Optional, Type
|
| 2 |
+
|
| 3 |
+
from django import http
|
| 4 |
+
|
| 5 |
+
class ContextMixin:
|
| 6 |
+
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: ...
|
| 7 |
+
|
| 8 |
+
class View:
|
| 9 |
+
http_method_names: List[str] = ...
|
| 10 |
+
request: http.HttpRequest = ...
|
| 11 |
+
args: Any = ...
|
| 12 |
+
kwargs: Any = ...
|
| 13 |
+
def __init__(self, **kwargs: Any) -> None: ...
|
| 14 |
+
@classmethod
|
| 15 |
+
def as_view(cls: Any, **initkwargs: Any) -> Callable[..., http.HttpResponse]: ...
|
| 16 |
+
def setup(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> None: ...
|
| 17 |
+
def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 18 |
+
def http_method_not_allowed(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 19 |
+
def options(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 20 |
+
|
| 21 |
+
class TemplateResponseMixin:
|
| 22 |
+
template_name: str = ...
|
| 23 |
+
template_engine: Optional[str] = ...
|
| 24 |
+
response_class: Type[http.HttpResponse] = ...
|
| 25 |
+
content_type: Optional[str] = ...
|
| 26 |
+
request: http.HttpRequest = ...
|
| 27 |
+
def render_to_response(self, context: Dict[str, Any], **response_kwargs: Any) -> http.HttpResponse: ...
|
| 28 |
+
def get_template_names(self) -> List[str]: ...
|
| 29 |
+
|
| 30 |
+
class TemplateView(TemplateResponseMixin, ContextMixin, View):
|
| 31 |
+
def get(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 32 |
+
|
| 33 |
+
class RedirectView(View):
|
| 34 |
+
permanent: bool = ...
|
| 35 |
+
url: Optional[str] = ...
|
| 36 |
+
pattern_name: Optional[str] = ...
|
| 37 |
+
query_string: bool = ...
|
| 38 |
+
def get_redirect_url(self, *args: Any, **kwargs: Any) -> Optional[str]: ...
|
| 39 |
+
def get(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 40 |
+
def head(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 41 |
+
def post(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 42 |
+
def delete(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 43 |
+
def put(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
| 44 |
+
def patch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> http.HttpResponse: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/dates.pyi
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import datetime
|
| 2 |
+
from typing import Any, Dict, Optional, Sequence, Tuple
|
| 3 |
+
|
| 4 |
+
from django.views.generic.base import View
|
| 5 |
+
from django.views.generic.detail import BaseDetailView, SingleObjectTemplateResponseMixin
|
| 6 |
+
from django.views.generic.list import MultipleObjectMixin, MultipleObjectTemplateResponseMixin
|
| 7 |
+
|
| 8 |
+
from django.db import models
|
| 9 |
+
from django.http import HttpRequest, HttpResponse
|
| 10 |
+
|
| 11 |
+
class YearMixin:
|
| 12 |
+
year_format: str = ...
|
| 13 |
+
year: Optional[str] = ...
|
| 14 |
+
def get_year_format(self) -> str: ...
|
| 15 |
+
def get_year(self) -> str: ...
|
| 16 |
+
def get_next_year(self, date: datetime.date) -> Optional[datetime.date]: ...
|
| 17 |
+
def get_previous_year(self, date: datetime.date) -> Optional[datetime.date]: ...
|
| 18 |
+
|
| 19 |
+
class MonthMixin:
|
| 20 |
+
month_format: str = ...
|
| 21 |
+
month: Optional[str] = ...
|
| 22 |
+
def get_month_format(self) -> str: ...
|
| 23 |
+
def get_month(self) -> str: ...
|
| 24 |
+
def get_next_month(self, date: datetime.date) -> Optional[datetime.date]: ...
|
| 25 |
+
def get_previous_month(self, date: datetime.date) -> Optional[datetime.date]: ...
|
| 26 |
+
|
| 27 |
+
class DayMixin:
|
| 28 |
+
day_format: str = ...
|
| 29 |
+
day: Optional[str] = ...
|
| 30 |
+
def get_day_format(self) -> str: ...
|
| 31 |
+
def get_day(self) -> str: ...
|
| 32 |
+
def get_next_day(self, date: datetime.date) -> Optional[datetime.date]: ...
|
| 33 |
+
def get_previous_day(self, date: datetime.date) -> Optional[datetime.date]: ...
|
| 34 |
+
|
| 35 |
+
class WeekMixin:
|
| 36 |
+
week_format: str = ...
|
| 37 |
+
week: Optional[str] = ...
|
| 38 |
+
def get_week_format(self) -> str: ...
|
| 39 |
+
def get_week(self) -> str: ...
|
| 40 |
+
def get_next_week(self, date: datetime.date) -> Optional[datetime.date]: ...
|
| 41 |
+
def get_previous_week(self, date: datetime.date) -> Optional[datetime.date]: ...
|
| 42 |
+
|
| 43 |
+
class DateMixin:
|
| 44 |
+
date_field: Optional[str] = ...
|
| 45 |
+
allow_future: bool = ...
|
| 46 |
+
def get_date_field(self) -> str: ...
|
| 47 |
+
def get_allow_future(self) -> bool: ...
|
| 48 |
+
def uses_datetime_field(self) -> bool: ...
|
| 49 |
+
|
| 50 |
+
DatedItems = Tuple[Optional[Sequence[datetime.date]], Sequence[object], Dict[str, Any]]
|
| 51 |
+
|
| 52 |
+
class BaseDateListView(MultipleObjectMixin, DateMixin, View):
|
| 53 |
+
date_list_period: str = ...
|
| 54 |
+
def render_to_response(self, context: Dict[str, Any], **response_kwargs: Any) -> HttpResponse: ...
|
| 55 |
+
def get(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
| 56 |
+
def get_dated_items(self) -> DatedItems: ...
|
| 57 |
+
def get_dated_queryset(self, **lookup: Any) -> models.query.QuerySet: ...
|
| 58 |
+
def get_date_list_period(self) -> str: ...
|
| 59 |
+
def get_date_list(
|
| 60 |
+
self, queryset: models.query.QuerySet, date_type: Optional[str] = ..., ordering: str = ...
|
| 61 |
+
) -> models.query.QuerySet: ...
|
| 62 |
+
|
| 63 |
+
class BaseArchiveIndexView(BaseDateListView): ...
|
| 64 |
+
class ArchiveIndexView(MultipleObjectTemplateResponseMixin, BaseArchiveIndexView): ...
|
| 65 |
+
|
| 66 |
+
class BaseYearArchiveView(YearMixin, BaseDateListView):
|
| 67 |
+
make_object_list: bool = ...
|
| 68 |
+
def get_make_object_list(self) -> bool: ...
|
| 69 |
+
|
| 70 |
+
class YearArchiveView(MultipleObjectTemplateResponseMixin, BaseYearArchiveView): ...
|
| 71 |
+
class BaseMonthArchiveView(YearMixin, MonthMixin, BaseDateListView): ...
|
| 72 |
+
class MonthArchiveView(MultipleObjectTemplateResponseMixin, BaseMonthArchiveView): ...
|
| 73 |
+
class BaseWeekArchiveView(YearMixin, WeekMixin, BaseDateListView): ...
|
| 74 |
+
class WeekArchiveView(MultipleObjectTemplateResponseMixin, BaseWeekArchiveView): ...
|
| 75 |
+
class BaseDayArchiveView(YearMixin, MonthMixin, DayMixin, BaseDateListView): ...
|
| 76 |
+
class DayArchiveView(MultipleObjectTemplateResponseMixin, BaseDayArchiveView): ...
|
| 77 |
+
class BaseTodayArchiveView(BaseDayArchiveView): ...
|
| 78 |
+
class TodayArchiveView(MultipleObjectTemplateResponseMixin, BaseTodayArchiveView): ...
|
| 79 |
+
class BaseDateDetailView(YearMixin, MonthMixin, DayMixin, DateMixin, BaseDetailView): ...
|
| 80 |
+
class DateDetailView(SingleObjectTemplateResponseMixin, BaseDateDetailView): ...
|
| 81 |
+
|
| 82 |
+
def timezone_today() -> datetime.date: ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/detail.pyi
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Optional, Type
|
| 2 |
+
|
| 3 |
+
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
|
| 4 |
+
|
| 5 |
+
from django.db import models
|
| 6 |
+
from django.http import HttpRequest, HttpResponse
|
| 7 |
+
|
| 8 |
+
class SingleObjectMixin(ContextMixin):
|
| 9 |
+
model: Type[models.Model] = ...
|
| 10 |
+
queryset: models.query.QuerySet = ...
|
| 11 |
+
slug_field: str = ...
|
| 12 |
+
context_object_name: str = ...
|
| 13 |
+
slug_url_kwarg: str = ...
|
| 14 |
+
pk_url_kwarg: str = ...
|
| 15 |
+
query_pk_and_slug: bool = ...
|
| 16 |
+
def get_object(self, queryset: Optional[models.query.QuerySet] = ...) -> models.Model: ...
|
| 17 |
+
def get_queryset(self) -> models.query.QuerySet: ...
|
| 18 |
+
def get_slug_field(self) -> str: ...
|
| 19 |
+
def get_context_object_name(self, obj: Any) -> Optional[str]: ...
|
| 20 |
+
|
| 21 |
+
class BaseDetailView(SingleObjectMixin, View):
|
| 22 |
+
def get(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
| 23 |
+
|
| 24 |
+
class SingleObjectTemplateResponseMixin(TemplateResponseMixin):
|
| 25 |
+
template_name_field: Optional[str] = ...
|
| 26 |
+
template_name_suffix: str = ...
|
| 27 |
+
|
| 28 |
+
class DetailView(SingleObjectTemplateResponseMixin, BaseDetailView): ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/edit.pyi
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable, Dict, Optional, Sequence, Type, Union
|
| 2 |
+
|
| 3 |
+
from django.forms.forms import BaseForm
|
| 4 |
+
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
|
| 5 |
+
from django.views.generic.detail import BaseDetailView, SingleObjectMixin, SingleObjectTemplateResponseMixin
|
| 6 |
+
from typing_extensions import Literal
|
| 7 |
+
|
| 8 |
+
from django.http import HttpRequest, HttpResponse
|
| 9 |
+
|
| 10 |
+
class FormMixin(ContextMixin):
|
| 11 |
+
initial: Dict[str, Any] = ...
|
| 12 |
+
form_class: Optional[Type[BaseForm]] = ...
|
| 13 |
+
success_url: Optional[Union[str, Callable[..., Any]]] = ...
|
| 14 |
+
prefix: Optional[str] = ...
|
| 15 |
+
def get_initial(self) -> Dict[str, Any]: ...
|
| 16 |
+
def get_prefix(self) -> Optional[str]: ...
|
| 17 |
+
def get_form_class(self) -> Type[BaseForm]: ...
|
| 18 |
+
def get_form(self, form_class: Optional[Type[BaseForm]] = ...) -> BaseForm: ...
|
| 19 |
+
def get_form_kwargs(self) -> Dict[str, Any]: ...
|
| 20 |
+
def get_success_url(self) -> str: ...
|
| 21 |
+
def form_valid(self, form: BaseForm) -> HttpResponse: ...
|
| 22 |
+
def form_invalid(self, form: BaseForm) -> HttpResponse: ...
|
| 23 |
+
|
| 24 |
+
class ModelFormMixin(FormMixin, SingleObjectMixin):
|
| 25 |
+
fields: Optional[Union[Sequence[str], Literal["__all__"]]] = ...
|
| 26 |
+
|
| 27 |
+
class ProcessFormView(View):
|
| 28 |
+
def get(self, request: HttpRequest, *args: str, **kwargs: Any) -> HttpResponse: ...
|
| 29 |
+
def post(self, request: HttpRequest, *args: str, **kwargs: Any) -> HttpResponse: ...
|
| 30 |
+
def put(self, *args: str, **kwargs: Any) -> HttpResponse: ...
|
| 31 |
+
|
| 32 |
+
class BaseFormView(FormMixin, ProcessFormView): ...
|
| 33 |
+
class FormView(TemplateResponseMixin, BaseFormView): ...
|
| 34 |
+
class BaseCreateView(ModelFormMixin, ProcessFormView): ...
|
| 35 |
+
class CreateView(SingleObjectTemplateResponseMixin, BaseCreateView): ...
|
| 36 |
+
class BaseUpdateView(ModelFormMixin, ProcessFormView): ...
|
| 37 |
+
class UpdateView(SingleObjectTemplateResponseMixin, BaseUpdateView): ...
|
| 38 |
+
|
| 39 |
+
class DeletionMixin:
|
| 40 |
+
success_url: Optional[str] = ...
|
| 41 |
+
def post(self, request: HttpRequest, *args: str, **kwargs: Any) -> HttpResponse: ...
|
| 42 |
+
def delete(self, request: HttpRequest, *args: str, **kwargs: Any) -> HttpResponse: ...
|
| 43 |
+
def get_success_url(self) -> str: ...
|
| 44 |
+
|
| 45 |
+
class BaseDeleteView(DeletionMixin, BaseDetailView): ...
|
| 46 |
+
class DeleteView(SingleObjectTemplateResponseMixin, BaseDeleteView): ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/generic/list.pyi
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Optional, Sequence, Tuple, Type
|
| 2 |
+
|
| 3 |
+
from django.core.paginator import Paginator
|
| 4 |
+
from django.db.models.query import QuerySet, _BaseQuerySet
|
| 5 |
+
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
|
| 6 |
+
|
| 7 |
+
from django.db.models import Model
|
| 8 |
+
from django.http import HttpRequest, HttpResponse
|
| 9 |
+
|
| 10 |
+
class MultipleObjectMixin(ContextMixin):
|
| 11 |
+
allow_empty: bool = ...
|
| 12 |
+
queryset: Optional[QuerySet] = ...
|
| 13 |
+
model: Optional[Type[Model]] = ...
|
| 14 |
+
paginate_by: int = ...
|
| 15 |
+
paginate_orphans: int = ...
|
| 16 |
+
context_object_name: Optional[str] = ...
|
| 17 |
+
paginator_class: Type[Paginator] = ...
|
| 18 |
+
page_kwarg: str = ...
|
| 19 |
+
ordering: Sequence[str] = ...
|
| 20 |
+
def get_queryset(self) -> QuerySet: ...
|
| 21 |
+
def get_ordering(self) -> Sequence[str]: ...
|
| 22 |
+
def paginate_queryset(self, queryset: _BaseQuerySet, page_size: int) -> Tuple[Paginator, int, QuerySet, bool]: ...
|
| 23 |
+
def get_paginate_by(self, queryset: _BaseQuerySet) -> Optional[int]: ...
|
| 24 |
+
def get_paginator(
|
| 25 |
+
self, queryset: QuerySet, per_page: int, orphans: int = ..., allow_empty_first_page: bool = ..., **kwargs: Any
|
| 26 |
+
) -> Paginator: ...
|
| 27 |
+
def get_paginate_orphans(self) -> int: ...
|
| 28 |
+
def get_allow_empty(self) -> bool: ...
|
| 29 |
+
def get_context_object_name(self, object_list: _BaseQuerySet) -> Optional[str]: ...
|
| 30 |
+
|
| 31 |
+
class BaseListView(MultipleObjectMixin, View):
|
| 32 |
+
def get(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
| 33 |
+
|
| 34 |
+
class MultipleObjectTemplateResponseMixin(TemplateResponseMixin):
|
| 35 |
+
template_name_suffix: str = ...
|
| 36 |
+
|
| 37 |
+
class ListView(MultipleObjectTemplateResponseMixin, BaseListView): ...
|
mantis_evalkit/lib/python3.10/site-packages/jedi/third_party/django-stubs/django-stubs/views/i18n.pyi
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Callable, Dict, List, Optional, Union
|
| 2 |
+
|
| 3 |
+
from django.http.request import HttpRequest
|
| 4 |
+
from django.http.response import HttpResponse
|
| 5 |
+
from django.utils.translation.trans_real import DjangoTranslation
|
| 6 |
+
|
| 7 |
+
from django.views.generic import View
|
| 8 |
+
|
| 9 |
+
LANGUAGE_QUERY_PARAMETER: str
|
| 10 |
+
|
| 11 |
+
def set_language(request: HttpRequest) -> HttpResponse: ...
|
| 12 |
+
def get_formats() -> Dict[str, Union[List[str], int, str]]: ...
|
| 13 |
+
|
| 14 |
+
js_catalog_template: str
|
| 15 |
+
|
| 16 |
+
def render_javascript_catalog(catalog: Optional[Any] = ..., plural: Optional[Any] = ...): ...
|
| 17 |
+
def null_javascript_catalog(request: Any, domain: Optional[Any] = ..., packages: Optional[Any] = ...): ...
|
| 18 |
+
|
| 19 |
+
class JavaScriptCatalog(View):
|
| 20 |
+
head: Callable
|
| 21 |
+
domain: str = ...
|
| 22 |
+
packages: List[str] = ...
|
| 23 |
+
translation: DjangoTranslation = ...
|
| 24 |
+
def get(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
| 25 |
+
def get_paths(self, packages: List[str]) -> List[str]: ...
|
| 26 |
+
def get_plural(self) -> None: ...
|
| 27 |
+
def get_catalog(self) -> Dict[str, Union[List[str], str]]: ...
|
| 28 |
+
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: ...
|
| 29 |
+
def render_to_response(self, context: Dict[str, Any], **response_kwargs: Any) -> HttpResponse: ...
|
| 30 |
+
|
| 31 |
+
class JSONCatalog(JavaScriptCatalog): ...
|
mantis_evalkit/lib/python3.10/site-packages/wheel/__init__.py
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
__version__ = "0.45.1"
|
mantis_evalkit/lib/python3.10/site-packages/wheel/__main__.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Wheel command line tool (enable python -m wheel syntax)
|
| 3 |
+
"""
|
| 4 |
+
|
| 5 |
+
from __future__ import annotations
|
| 6 |
+
|
| 7 |
+
import sys
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def main(): # needed for console script
|
| 11 |
+
if __package__ == "":
|
| 12 |
+
# To be able to run 'python wheel-0.9.whl/wheel':
|
| 13 |
+
import os.path
|
| 14 |
+
|
| 15 |
+
path = os.path.dirname(os.path.dirname(__file__))
|
| 16 |
+
sys.path[0:0] = [path]
|
| 17 |
+
import wheel.cli
|
| 18 |
+
|
| 19 |
+
sys.exit(wheel.cli.main())
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
if __name__ == "__main__":
|
| 23 |
+
sys.exit(main())
|