False positive "BaseManager[User]" has no attribute "create_user"
on default User
Model
#1654
Labels
bug
Something isn't working
Bug report
What's wrong
The following code:
Generates an type checking error:
This works at runtime, however.
The Django
User
derives fromAbstractUser
, which sets:And
UserManager
defines:How is that should be
Expect no type error.
System information
python
version: 3.10.11django
version: 4.2.4mypy
version: 1.5.0django-stubs
version: 4.2.3django-stubs-ext
version: 4.2.2This error did not appear in Mypy 1.4.1, but started appearing in 1.5.0.
The text was updated successfully, but these errors were encountered: