-
-
Notifications
You must be signed in to change notification settings - Fork 553
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestmypy-pluginIssues specific to mypy_django_pluginIssues specific to mypy_django_plugin
Description
Bug report
Model.objects.create() will correctly type check the kwargs for field names and types, whereas Model.objects.get_or_create() does not. Notice how mypy catches the first line but misses the second (vscode plugin, mypy CLI gives the same output)
These methods are affected:
acreateaget_or_createaupdateaupdate_or_createget_or_createupdateupdate_or_create
Many of the queryset methods are also missing field name checking, such as distinct, exclude, in_bulk, etc. (not sure if this is possible due to query annotations)
System information
- OS: PopOS 22.04
pythonversion: 3.10.6djangoversion: 4.0.7mypyversion: 0.991django-stubsversion: 1.13.0django-stubs-extversion: 0.7.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestmypy-pluginIssues specific to mypy_django_pluginIssues specific to mypy_django_plugin
