Open
Description
Bug report
What's wrong
class MySerializer(serializers.Serializer[int]): ...
MySerializer([1,2,3], many=True)
error: Argument 1 to "MySerializer" has incompatible type "List[int]"; expected "Optional[int]" [arg-type]
How is that should be
Success: no issues found in 1 source file
System information
- OS:
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.0
Also, it isn't asked for by the template, but:
djangorestframework
version: 3.13.1djangorestframework-stubs
version: 1.7.0