You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing django-stubs (pip install django-stubs) the typing tests in the users app fail with Name 'settings.AUTH_USER_MODEL' is not defined.
reveal_type(settings.AUTH_USER_MODEL) returns Any which doesn't provide much value. Did this work differently at some stage in the past? If not, an easy fix would be to remove the annotations in the test function signatures.
Furthermore, the type of settings.AUTH_USER_MODEL is str and the user type should be a subclass of a django model. If that is correct, that might be another reason to remove the annotation.
What should've happened instead?
No mypy errors
Steps to reproduce
pip install django-stubs
mypy <project dir>
The text was updated successfully, but these errors were encountered:
What happened?
After installing
django-stubs
(pip install django-stubs
) the typing tests in theusers
app fail withName 'settings.AUTH_USER_MODEL' is not defined
.reveal_type(settings.AUTH_USER_MODEL)
returnsAny
which doesn't provide much value. Did this work differently at some stage in the past? If not, an easy fix would be to remove the annotations in the test function signatures.Furthermore, the type of
settings.AUTH_USER_MODEL
isstr
and theuser
type should be a subclass of a django model. If that is correct, that might be another reason to remove the annotation.What should've happened instead?
No mypy errors
Steps to reproduce
The text was updated successfully, but these errors were encountered: