Skip to content

Commit 64685c8

Browse files
authored
[django-filter] fix return type for MultipleChoiceFilter.get_filter_predicate (#15418)
1 parent 566c5c2 commit 64685c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stubs/django-filter/django_filters/filters.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from collections.abc import Callable, Iterable
22
from typing import Any
33

44
from django import forms
5-
from django.db.models import Q, QuerySet
5+
from django.db.models import QuerySet
66
from django.forms import Field
77
from django_stubs_ext import StrOrPromise
88

@@ -131,7 +131,7 @@ class MultipleChoiceFilter(Filter):
131131
) -> None: ...
132132
def is_noop(self, qs: QuerySet[Any], value: Any) -> bool: ... # Value can be any filter input
133133
def filter(self, qs: QuerySet[Any], value: Any) -> QuerySet[Any]: ...
134-
def get_filter_predicate(self, v: Any) -> Q: ... # Predicate value can be any filter input type
134+
def get_filter_predicate(self, v: Any) -> dict[str, Any]: ... # Predicate value can be any filter input type
135135

136136
class TypedMultipleChoiceFilter(MultipleChoiceFilter):
137137
field_class: type[forms.TypedMultipleChoiceField] # More specific than parent MultipleChoiceField

0 commit comments

Comments
 (0)