[django-filter] Improve stubtest comment (#14738)

This commit is contained in:
Sebastian Rittau
2025-09-22 13:57:31 +02:00
committed by GitHub
parent da93072ceb
commit a2c34cc1d0
2 changed files with 5 additions and 3 deletions
@@ -15,6 +15,5 @@ django_filters.fields.RangeField.__init__
django_filters.filters.QuerySetRequestMixin.__init__
django_filters.widgets.CSVWidget.__init__
# FIXME: new stubtest errors from mypy v1.18.1 that need to be looked at more closely.
# See https://github.com/python/typeshed/pull/14699
# BaseCSVFilter constructs a custom class dynamically, which stubtest can't handle.
django_filters(\.\w+)*\.OrderingFilter.field_class
@@ -292,7 +292,10 @@ class LookupChoiceFilter(Filter):
def filter(self, qs: QuerySet[Any], lookup: Lookup) -> QuerySet[Any]: ...
class OrderingFilter(BaseCSVFilter, ChoiceFilter):
field_class: type[BaseCSVField] # Inherits CSV field behavior for comma-separated ordering
# Inherits CSV field behavior for comma-separated ordering.
# BaseCSVFilter constructs a custom ConcreteCSVField class that derives
# from BaseCSVField.
field_class: type[BaseCSVField]
descending_fmt: str
param_map: dict[str, str] | None
def __init__(