Closed flaeppe closed 2 months ago
django.contrib.auth.models.User.email allows assignment of an integer. It's not just a problem for the User model but for all instances of EmailField.
django.contrib.auth.models.User.email
User
EmailField
from django.contrib.auth.models import User user = User() user.email = 1
There should be an "Incompatible types in assignment ..."
python
3.12.3
django
5.0.6
mypy
1.10.0
django-stubs
master
django-stubs-ext
Bug report
django.contrib.auth.models.User.email
allows assignment of an integer. It's not just a problem for theUser
model but for all instances ofEmailField
.What's wrong
How is that should be
There should be an "Incompatible types in assignment ..."
System information
python
version:3.12.3
django
version:5.0.6
mypy
version:1.10.0
django-stubs
version:master
django-stubs-ext
version:master