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
contrib.auth.backends.RemoteUserBackend.configure_user is typed to take a User: user argument and likewise return a User.
How is that should be
I believe this should be AbstractBaseUser.
It could also see using a TypVar to ensure the return type is the same subtype of AbstractBaseUser as the passed type.
Ideally it would even be the configured user model, but I am not sure if that is feasible.
System information
OS: Linux
python version: Python 3.9.7
django version: 3.1
mypy version: 0.812
django-stubs version: 1.8.0 (it is the same in master)
django-stubs-ext version: n/a
The text was updated successfully, but these errors were encountered:
Bug report
What's wrong
contrib.auth.backends.RemoteUserBackend.configure_user
is typed to take aUser: user
argument and likewise return aUser
.How is that should be
I believe this should be
AbstractBaseUser
.It could also see using a
TypVar
to ensure the return type is the same subtype ofAbstractBaseUser
as the passed type.Ideally it would even be the configured user model, but I am not sure if that is feasible.
System information
python
version: Python 3.9.7django
version: 3.1mypy
version: 0.812django-stubs
version: 1.8.0 (it is the same in master)django-stubs-ext
version: n/aThe text was updated successfully, but these errors were encountered: