mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 22:11:54 +08:00
black reformat, some fixes
This commit is contained in:
@@ -41,7 +41,9 @@ class GenericForeignKey(FieldCacheMixin):
|
||||
def get_prefetch_queryset(
|
||||
self, instances: Union[List[Model], QuerySet], queryset: Optional[QuerySet] = ...
|
||||
) -> Tuple[List[Model], Callable, Callable, bool, str, bool]: ...
|
||||
def __get__(self, instance: Optional[Model], cls: Type[Model] = ...) -> Optional[Union[GenericForeignKey, Model]]: ...
|
||||
def __get__(
|
||||
self, instance: Optional[Model], cls: Type[Model] = ...
|
||||
) -> Optional[Union[GenericForeignKey, Model]]: ...
|
||||
def __set__(self, instance: Model, value: Optional[Model]) -> None: ...
|
||||
|
||||
class GenericRel(ForeignObjectRel):
|
||||
@@ -95,7 +97,9 @@ class GenericRelation(ForeignObject):
|
||||
def set_attributes_from_rel(self) -> None: ...
|
||||
def get_internal_type(self) -> str: ...
|
||||
def get_content_type(self) -> ContentType: ...
|
||||
def get_extra_restriction(self, where_class: Type[WhereNode], alias: Optional[str], remote_alias: str) -> WhereNode: ...
|
||||
def get_extra_restriction(
|
||||
self, where_class: Type[WhereNode], alias: Optional[str], remote_alias: str
|
||||
) -> WhereNode: ...
|
||||
def bulk_related_objects(self, objs: List[Model], using: str = ...) -> QuerySet: ...
|
||||
|
||||
class ReverseGenericManyToOneDescriptor(ReverseManyToOneDescriptor):
|
||||
|
||||
@@ -24,5 +24,10 @@ def get_contenttypes_and_models(
|
||||
app_config: AppConfig, using: str, ContentType: Type[ContentType]
|
||||
) -> Tuple[Dict[str, ContentType], Dict[str, Type[Model]]]: ...
|
||||
def create_contenttypes(
|
||||
app_config: AppConfig, verbosity: int = ..., interactive: bool = ..., using: str = ..., apps: Apps = ..., **kwargs: Any
|
||||
app_config: AppConfig,
|
||||
verbosity: int = ...,
|
||||
interactive: bool = ...,
|
||||
using: str = ...,
|
||||
apps: Apps = ...,
|
||||
**kwargs: Any
|
||||
) -> None: ...
|
||||
|
||||
@@ -3,4 +3,6 @@ from typing import Any, Optional, Union
|
||||
from django.http.request import HttpRequest
|
||||
from django.http.response import HttpResponseRedirect
|
||||
|
||||
def shortcut(request: HttpRequest, content_type_id: Union[int, str], object_id: Union[int, str]) -> HttpResponseRedirect: ...
|
||||
def shortcut(
|
||||
request: HttpRequest, content_type_id: Union[int, str], object_id: Union[int, str]
|
||||
) -> HttpResponseRedirect: ...
|
||||
|
||||
Reference in New Issue
Block a user