|
1 | 1 | import zipfile |
2 | 2 | from collections.abc import Sequence |
| 3 | +from io import BufferedReader |
| 4 | +from typing import Callable, Literal |
3 | 5 |
|
4 | 6 | from django.apps.config import AppConfig |
5 | 7 | from django.core.management.base import BaseCommand |
| 8 | +from django.core.serializers.base import DeserializedObject |
| 9 | +from django.db.backends.base.base import BaseDatabaseWrapper |
6 | 10 | from django.db.models.base import Model |
7 | 11 | from django.utils.functional import cached_property |
| 12 | +from typing_extensions import TypeAlias |
8 | 13 |
|
9 | 14 | has_bz2: bool |
10 | 15 | has_lzma: bool |
11 | 16 |
|
12 | 17 | READ_STDIN: str |
| 18 | +_ReadBinaryMode: TypeAlias = Literal["r", "rb"] |
13 | 19 |
|
14 | 20 | class Command(BaseCommand): |
| 21 | + missing_args_message: str |
15 | 22 | ignore: bool |
16 | 23 | using: str |
17 | 24 | app_label: str |
18 | 25 | verbosity: int |
19 | 26 | excluded_models: set[type[Model]] |
20 | 27 | excluded_apps: set[AppConfig] |
21 | 28 | format: str |
22 | | - missing_args_message: str |
| 29 | + fixture_count: int |
| 30 | + loaded_object_count: int |
| 31 | + fixture_object_count: int |
| 32 | + models: set[type[Model]] |
| 33 | + serialization_formats: list[str] |
| 34 | + objs_with_deferred_fields: list[DeserializedObject] |
| 35 | + @cached_property |
| 36 | + def compression_formats(self) -> dict[str | None, tuple[Callable[[str, _ReadBinaryMode], BufferedReader]]]: ... |
| 37 | + def reset_sequences(self, connection: BaseDatabaseWrapper, models: set[type[Model]]) -> None: ... |
23 | 38 | def loaddata(self, fixture_labels: Sequence[str]) -> None: ... |
| 39 | + def save_obj(self, obj: DeserializedObject) -> bool: ... |
24 | 40 | def load_label(self, fixture_label: str) -> None: ... |
| 41 | + def get_fixture_name_and_dirs(self, fixture_name: str) -> tuple[str, list[str]]: ... |
| 42 | + def get_targets(self, fixture_name: str, ser_fmt: str | None, cmp_fmt: str | None) -> set[str]: ... |
| 43 | + def find_fixture_files_in_dir( |
| 44 | + self, fixture_dir: str, fixture_name: str, targets: set[str] |
| 45 | + ) -> list[tuple[str, str, str]]: ... |
25 | 46 | def find_fixtures(self, fixture_label: str) -> list[tuple[str, str | None, str | None]]: ... |
26 | 47 | @cached_property |
27 | 48 | def fixture_dirs(self) -> list[str]: ... |
|
0 commit comments