-
-
Notifications
You must be signed in to change notification settings - Fork 480
Can't import RelatedManager #765
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
Comments
This should work: if typing.TYPE_CHECKING:
from django.db.models.manager import RelatedManager |
Please, reopen if it does not. |
@sobolevn, this worked fine for me in 4.2.6, but is now broken after upgrading to 4.2.7 |
@tylerlaprade Yes, this changed in 4.2.7, it was covered in the release notes:
But we have another issue #1868 that suggests this may not work in Pylance/pyright. If you could help us troubleshoot it, it would be appreciated. |
In any case, please report back if that works for you or not. |
Oh nice, |
If I write:
I get "import could not be resolved". It seems that the
.db.models.manager
part is not "seen".. (I also can't "go to definition" there). Any ideas?The text was updated successfully, but these errors were encountered: