mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 14:31:56 +08:00
Merge pull request #536 from wkschwartz/patch-1
Fix incorrect and add missing annotations for loaddata command
This commit is contained in:
@@ -1,19 +1,35 @@
|
|||||||
import zipfile
|
import zipfile
|
||||||
from typing import Iterable, List, Optional, Tuple
|
from typing import List, Optional, Set, Sequence, Tuple, Type
|
||||||
|
|
||||||
|
from django.apps.config import AppConfig
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
|
from django.db.models.base import Model
|
||||||
|
|
||||||
READ_STDIN: str = ...
|
READ_STDIN: str = ...
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
|
ignore: bool = ...
|
||||||
|
using: str = ...
|
||||||
|
app_label: str = ...
|
||||||
|
verbosity: int = ...
|
||||||
|
excluded_models: Set[Type[Model]] = ...
|
||||||
|
excluded_apps: Set[AppConfig] = ...
|
||||||
|
format: str = ...
|
||||||
missing_args_message: str = ...
|
missing_args_message: str = ...
|
||||||
def loaddata(self, fixture_labels: Iterable[str]) -> None: ...
|
def loaddata(self, fixture_labels: Sequence[str]) -> None: ...
|
||||||
def load_label(self, fixture_label: str) -> None: ...
|
def load_label(self, fixture_label: str) -> None: ...
|
||||||
def find_fixtures(self, fixture_label: str) -> List[Optional[str]]: ...
|
def find_fixtures(self, fixture_label: str) -> List[Tuple[str, Optional[str], Optional[str]]]: ...
|
||||||
@property
|
@property
|
||||||
def fixture_dirs(self) -> List[str]: ...
|
def fixture_dirs(self) -> List[str]: ...
|
||||||
def parse_name(self, fixture_name: str) -> Tuple[str, str, str]: ...
|
def parse_name(self, fixture_name: str) -> Tuple[str, Optional[str], Optional[str]]: ...
|
||||||
|
|
||||||
class SingleZipReader(zipfile.ZipFile): ...
|
class SingleZipReader(zipfile.ZipFile):
|
||||||
|
# Incompatible override
|
||||||
|
# zipfile.ZipFile.read(
|
||||||
|
# self,
|
||||||
|
# name: typing.Union[typing.Text, zipfile.ZipInfo],
|
||||||
|
# pwd: Optional[bytes] = ...,
|
||||||
|
# ) -> bytes: ...
|
||||||
|
def read(self) -> bytes: ... # type: ignore[override]
|
||||||
|
|
||||||
def humanize(dirname: str) -> str: ...
|
def humanize(dirname: str) -> str: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user