Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue when using django-polymorphic along with typeddjango #529

Open
AntoineRondelet opened this issue Sep 20, 2022 · 0 comments
Open

Comments

@AntoineRondelet
Copy link

Hi, this ticket is echoes typeddjango/django-stubs#1158 which I opened earlier today on the typeddjango repo.

In short and as explained there, mypy (I'm using the django stubs) started to complain when I started to use django-polymorphic. Mypy complained that it couldn't resolve the manager type in classes inheriting from the polymorphic model.

Do I need to do something specific to get this to work well with mypy? I tried to change base_manager_name in the child classes to try to use a non_polymorphic manager but that didn't solve my issue.

I'm raising this ticket in this repo in case this issue comes from here and not from the typeddjango project. I might also have done something wrong. I'd welcome feedback if any.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant