Skip to content

Generic params are not passed correctly to QuerySet methods' return type #46

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

Closed
mkurnikov opened this issue Mar 13, 2019 · 0 comments · Fixed by #109
Closed

Generic params are not passed correctly to QuerySet methods' return type #46

mkurnikov opened this issue Mar 13, 2019 · 0 comments · Fixed by #109

Comments

@mkurnikov
Copy link
Member

[CASE custom_unannotated_manager_select_related_returns_proper_queryset]
from django.db import models
class MyManager(models.Manager):
    pass
class User(models.Model):
    objects = MyManager()

reveal_type(User.objects)  # E: Revealed type is 'main.MyManager[main.User]'
reveal_type(User.objects.select_related())  # E: Revealed type is 'django.db.models.query.QuerySet[main.User*, main.User*]'
[/CASE]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant