Fix base class for correct typing support
last-partizan opened this issue · comments
Serhii Tereshchenko commented
Hi, we're using pyright to type-check our code, and djangorestframework-types
as types for DRF.
Type for filter_backends
is defined as
filter_backends: Sequence[Type[BaseFilterBackend]]
So, all filter must be subclasses of BaseFilterBackend.
Could you please add it as base class to DjangoFilterBackend
?
Carlton Gibson commented
It might be that we can define a Protocol here, but adding a inheritance just to satisfy the type checker is not the right move.
Serhii Tereshchenko commented
yeah, we can definitely add protocol. Thanks.