Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteUserBackend.configure_user uses User instead of AbstractUser #744

Closed
tilsche opened this issue Nov 3, 2021 · 0 comments · Fixed by #909
Closed

RemoteUserBackend.configure_user uses User instead of AbstractUser #744

tilsche opened this issue Nov 3, 2021 · 0 comments · Fixed by #909
Labels
bug Something isn't working

Comments

@tilsche
Copy link

tilsche commented Nov 3, 2021

Bug report

What's wrong

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
@tilsche tilsche added the bug Something isn't working label Nov 3, 2021
@sterliakov sterliakov mentioned this issue Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant