-
Notifications
You must be signed in to change notification settings - Fork 856
Open
Labels
bugSomething isn't workingSomething isn't workingdjangoRelated to django supportRelated to django support
Description
See this issue #5027
- Install django-stubs into your environment
- Set typechecking mode to basic
- Add the following code to a file
from django.db import models
class MyModel(models.Model):
nullable = models.IntegerField(null=True)
def foo():
m = MyModel.objects.get()
def accepts_only_int(x: int):
pass
accepts_only_int(m.nullable)
- If we actually used the django-stubs, passing m.nullable to accepts_only_int shouldn't show an error.
- If you goto declaration on models.IntegerField it will still jump into our bundled stubs.
Viicos, basicdays, almahdi404, SteveByerly, dickermoshe and 13 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdjangoRelated to django supportRelated to django support