djangorestframework-stubs
djangorestframework-stubs copied to clipboard
Incorrect type hint for `api_settings.DEFAULT_FILTER_BACKENDS`
Bug report
What's wrong
In api_settings, DEFAULT_FILTER_BACKENDS is typed as Sequence[str], but it is used in GenericAPIView, which is typed as Sequence[Union[Type[BaseFilterBackend], Type[BaseFilterProtocol[_MT_co]]]].
How is that should be
As stated in the APISettings docstring](https://github.com/encode/django-rest-framework/blob/e5fb9af0eaffde683fa0af3987085f86cf0d2640/rest_framework/settings.py#L184), the import strings are resolved to the corresponding classes, so the resulting strings should not appear in api_settings.
System information
- OS:
pythonversion: 3.10.4djangoversion: 4.0.4mypyversion: 0.950django-stubsversion: 1.11.0