Skip to content

[django-filter] Broaden OrderingFilter fields parameter type (again) #16245

Description

@markgajdosik

Following #14856, the OrderingFilter.fields no longer allows something like OrderingFilter(fields=['a', 'b', ('c', 'c__d')] due to the stubs declaring fields as dict[str, str] | Iterable[str] | Iterable[tuple[str, str]]. The more correct type should be dict[str, str] | Iterable[str | tuple[str, str]].

Despite the docs being vague about it, this is a valid usage supported by the django-filter code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions