[django-filter] fix return type for MultipleChoiceFilter.get_filter_predicate (#15418)

This commit is contained in:
Brian Kohan
2026-02-11 22:55:40 -08:00
committed by GitHub
parent 566c5c2a22
commit 64685c86d3
@@ -2,7 +2,7 @@ from collections.abc import Callable, Iterable
from typing import Any
from django import forms
from django.db.models import Q, QuerySet
from django.db.models import QuerySet
from django.forms import Field
from django_stubs_ext import StrOrPromise
@@ -131,7 +131,7 @@ class MultipleChoiceFilter(Filter):
) -> None: ...
def is_noop(self, qs: QuerySet[Any], value: Any) -> bool: ... # Value can be any filter input
def filter(self, qs: QuerySet[Any], value: Any) -> QuerySet[Any]: ...
def get_filter_predicate(self, v: Any) -> Q: ... # Predicate value can be any filter input type
def get_filter_predicate(self, v: Any) -> dict[str, Any]: ... # Predicate value can be any filter input type
class TypedMultipleChoiceFilter(MultipleChoiceFilter):
field_class: type[forms.TypedMultipleChoiceField] # More specific than parent MultipleChoiceField