mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-19 02:15:59 +08:00
cleanups
This commit is contained in:
@@ -1,25 +1,23 @@
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union, Iterable
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Type, Union
|
||||
|
||||
from django.apps.config import AppConfig
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.query import QuerySet
|
||||
|
||||
from .base import (
|
||||
Serializer as Serializer,
|
||||
Deserializer as Deserializer,
|
||||
SerializerDoesNotExist as SerializerDoesNotExist,
|
||||
SerializationError as SerializationError,
|
||||
DeserializationError as DeserializationError,
|
||||
M2MDeserializationError as M2MDeserializationError,
|
||||
DeserializedObject,
|
||||
Deserializer as Deserializer,
|
||||
M2MDeserializationError as M2MDeserializationError,
|
||||
SerializationError as SerializationError,
|
||||
Serializer as Serializer,
|
||||
SerializerDoesNotExist as SerializerDoesNotExist,
|
||||
)
|
||||
|
||||
BUILTIN_SERIALIZERS: Any
|
||||
|
||||
class BadSerializer:
|
||||
internal_use_only: bool = ...
|
||||
exception: ModuleNotFoundError = ...
|
||||
def __init__(self, exception: ImportError) -> None: ...
|
||||
exception: BaseException = ...
|
||||
def __init__(self, exception: BaseException) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
|
||||
def register_serializer(format: str, serializer_module: str, serializers: Optional[Dict[str, Any]] = ...) -> None: ...
|
||||
@@ -28,8 +26,6 @@ def get_serializer(format: str) -> Union[Type[Serializer], BadSerializer]: ...
|
||||
def get_serializer_formats() -> List[str]: ...
|
||||
def get_public_serializer_formats() -> List[str]: ...
|
||||
def get_deserializer(format: str) -> Union[Callable, Type[Deserializer]]: ...
|
||||
def serialize(format: str, queryset: Iterable[Model], **options: Any) -> Optional[Union[bytes, str]]: ...
|
||||
def serialize(format: str, queryset: Iterable[Model], **options: Any) -> Any: ...
|
||||
def deserialize(format: str, stream_or_string: Any, **options: Any) -> Iterator[DeserializedObject]: ...
|
||||
def sort_dependencies(
|
||||
app_list: Union[Iterable[Tuple[AppConfig, None]], Iterable[Tuple[str, Iterable[Type[Model]]]]]
|
||||
) -> List[Type[Model]]: ...
|
||||
def sort_dependencies(app_list: Iterable[Any]) -> List[Type[Model]]: ...
|
||||
|
||||
Reference in New Issue
Block a user