mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 00:37:11 +08:00
Prior to this change, ManyToManyField was declared as being generic in _ST and _GT, but also used the _T Typevar in its __init__ signature. This caused mypy to add _T to the variables it was generic in when used as an alias. The symptom of this problem was that mypy would show an error with the message "Type application has too few types (3 expected)" where a ManyToManyField alias was declared, but adding an extra argument would fail because the type only takes two arguments. This change brings the signature of ManyToManyField in line with ForeignKey and OneToOneField.