typeddjango / djangorestframework-stubs

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

Update Field stubs to include `None` as an input/output type #511

Open Kangaroux opened 10 months ago

Kangaroux commented 10 months ago

I have made things!

This updates the field stubs to include None as valid input/output. The only projects that should be impacted by this change are those using serializer fields directly which I imagine are a very small minority. Since BaseSerializer is a subclass of Field but uses Any as the input/output types, the serializer stubs should remain unchanged.

Related issues