Cannot resolve manager type when using django-polymorphic #1158
Labels
3rd party
Presence of a third party dependency has been mentioned
bug
Something isn't working
mypy-plugin
Issues specific to mypy_django_plugin
Bug report
Hi, I'm not sure if this is a genuine bug or if I am just doing something wrong.
I recently used django-polymorphic to add a new feature in my project and mypy is now breaking. I have plenty of errors:
and
After checking the django polymorphic docs: https://django-polymorphic.readthedocs.io/en/stable/managers.html#manager-inheritance I can see that the manager is inherited. Could that be the source of mypy's troubles here? I feel it could be, but I'd be happy to get opinions.
Is that a known issue with django-polymorphic that I simply am not aware of? If so, is there a (concise) way around it? If not, I'll probably fallback to the "multiple FK in a model" approach to keep mypy running...
Happy to hear if I'm missing something obvious!
Thanks in advance! :)
System information
python
version: 3.10.6django
version: 4.1mypy
version: 0.971django-stubs
version: 1.12.0django-stubs-ext
version: 0.5.0The text was updated successfully, but these errors were encountered: