Skip to content

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

Merged
srittau merged 2 commits intopython:mainfrom
bckohan:django-filters
Feb 12, 2026
Merged

[django-filter] fix return type for MultipleChoiceFilter.get_filter_predicate#15418
srittau merged 2 commits intopython:mainfrom
bckohan:django-filters

Conversation

@bckohan
Copy link
Contributor

@bckohan bckohan commented Feb 11, 2026

@intgr @huynguyengl99 @srittau

MultipleChoiceFilter.get_filter_predicate is type hinted to return a Q object, but the implementation returns a dictionary that maps strings to any predicate value - which is then used in the code to create Q objects. This PR fixes the descrepancy.

@bckohan bckohan changed the title fix return type for MultipleChoiceFilter.get_filter_predicate [django-filters] fix return type for MultipleChoiceFilter.get_filter_predicate Feb 11, 2026
@bckohan bckohan changed the title [django-filters] fix return type for MultipleChoiceFilter.get_filter_predicate [django-filter] fix return type for MultipleChoiceFilter.get_filter_predicate Feb 11, 2026
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit 64685c8 into python:main Feb 12, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants