typeddjango / djangorestframework-stubs

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

[3.15] Add `__class_getitem__` of classes #585

Closed JaeHyuckSa closed 5 months ago

JaeHyuckSa commented 5 months ago

I have made things!

I added __class_getitem__ of classes in DRF version 3.15.

The following are class items with __class_getitem__ added.

Related issues

Upstream PR: https://github.com/encode/django-rest-framework/pull/8825

Related PR #582 I had PR deleted due to my mistake... I apologize.

JaeHyuckSa commented 5 months ago

Regarding your inquiry, is it better to coordinate the current BaseSerializer __class_getitem__?

https://github.com/typeddjango/djangorestframework-stubs/blob/41773dd23a596b5f8dee10028b5cbbd1d451710d/rest_framework-stubs/serializers.pyi#L82