typeddjango / djangorestframework-stubs

PEP-484 stubs for django-rest-framework
MIT License
439 stars 115 forks source link

fix(relations): remove some typevars in favor of Any #608

Open Linkid opened 4 months ago

Linkid commented 4 months ago

I have made things!

RelatedField subclasses can avoid dealing with data type and model type TypeVars override, as they are not specific.

This should fix the "Need type annotation for" that mypy raises for all related field subclasses.

Related issues

Ref #168

Linkid commented 4 months ago

Hello. I've forgotten some methods. This should be fixed in the latest commit.