Open christianbundy opened 2 years ago
class Foo(serializers.PrimaryKeyRelatedField[FooModel]): ...
serializers.PrimaryKeyRelatedField[FooModel] TypeError: 'type' object is not subscriptable
Success: no issues found in 1 source file
Linux f16759b1b324 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 aarch64 GNU/Linux
python
django
mypy
django-stubs
Also, it isn't asked for by the template, but:
djangorestframework
djangorestframework-stubs
I've seen some open issues about similar problems, but:
PrimaryKeyRelatedField
I think this is an unexpected defect, but please let me know if I've just misunderstood the other issues.
Hope this helps https://github.com/typeddjango/djangorestframework-stubs/issues/255#issuecomment-1320496964
Bug report
What's wrong
How is that should be
System information
Linux f16759b1b324 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 aarch64 GNU/Linux
python
version: 3.10.6django
version: 4.0.7mypy
version: 0.961django-stubs
version: 1.12.0Also, it isn't asked for by the template, but:
djangorestframework
version: 3.13.1djangorestframework-stubs
version: 1.7.0