Skip to content

Commit

Permalink
Added types using QuerySet[Any] and Callable[..., Any]
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeHyuckSa committed May 20, 2024
1 parent 3ab49c2 commit f6f1cdd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions django-stubs/db/models/fields/related_descriptors.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ class ForwardManyToOneDescriptor(Generic[_F]):
@cached_property
def RelatedObjectDoesNotExist(self) -> type[ObjectDoesNotExist]: ...
def is_cached(self, instance: Model) -> bool: ...
def get_queryset(self, **hints: Any) -> QuerySet: ...
def get_queryset(self, **hints: Any) -> QuerySet[Any]: ...
def get_prefetch_queryset(
self, instances: list[Model], queryset: QuerySet | None = ...
) -> tuple[QuerySet, Callable, Callable, bool, str, bool]: ...
self, instances: list[Model], queryset: QuerySet[Any] | None = ...
) -> tuple[QuerySet[Any], Callable[..., Any], Callable[..., Any], bool, str, bool]: ...
def get_prefetch_querysets(
self, instances: list[Model], querysets: list[QuerySet] | None = ...
) -> tuple[QuerySet, Callable, Callable, bool, str, bool]: ...
self, instances: list[Model], querysets: list[QuerySet[Any]] | None = ...
) -> tuple[QuerySet[Any], Callable[..., Any], Callable[..., Any], bool, str, bool]: ...
def get_object(self, instance: Model) -> Model: ...
def __get__(
self, instance: Model | None, cls: type[Model] | None = ...
) -> Model | ForwardManyToOneDescriptor | None: ...
def __set__(self, instance: Model, value: Model | None) -> None: ...
def __reduce__(self) -> tuple[Callable, tuple[type[Model], str]]: ...
def __reduce__(self) -> tuple[Callable[..., Any], tuple[type[Model], str]]: ...

class ForwardOneToOneDescriptor(ForwardManyToOneDescriptor[_F]):
def get_object(self, instance: Model) -> Model: ...
Expand Down

0 comments on commit f6f1cdd

Please sign in to comment.