Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mypy: Don't use lazy ManyToManyField with implicit app label
In newer mypy[1][2], `ManyToManyField`s with lazy (string) models but no app label don't work. For the `to` model, we can just use `Person` directly (and do on the line above), so do that. For the `through` model, add the app label -- Django doesn't care, and it makes mypy happy. Also, in mypy, well-structured wildcard patterns match without a submodule too, so simplify some config. [1] typeddjango/django-stubs#1802 (comment), [2] typeddjango/django-stubs#1719 (comment) [3] https://mypy.readthedocs.io/en/stable/config_file.html#config-file-format
- Loading branch information