typeddjango / djangorestframework-stubs

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

Allow Mapping type as serializer context #636

Open adrianmrit opened 2 months ago

adrianmrit commented 2 months ago

TypedDict t is not compatible with dict, see https://peps.python.org/pep-0589/#type-consistency. However, they are very practical, for instance, to type hint the context of serializers that expect more arguments.

Using a Mapping for the type would give more flexibility.