-
-
Notifications
You must be signed in to change notification settings - Fork 516
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
What's wrong
I cant use UserAdmin for a user that's based on AbstractBaseUser and I cant import BaseUserAdmin.
saskatoon/member/admin.py:50: error: Type argument "AuthUser" of "UserAdmin" must be a subtype of "AbstractUser" [type-var]
ImportError: cannot import name 'BaseUserAdmin' from 'django.contrib.auth.admin' (/app/.tox/mypy/lib/python3.9/site-packages/django/contrib/auth/admin.py)
The class declaration is as such:
class AuthUserAdmin(UserAdmin[AuthUser]):
See https://github.com/LesFruitsDefendus/saskatoon-ng/blob/mypy_django/saskatoon/member/admin.py for the actual file.
How is that should be
I dont know what I'm supposed to do.
System information
- OS: debian bullseye
pythonversion: 3.9.23djangoversion: 3.2.25mypyversion: 1.15.0django-stubsversion: 5.1.3django-stubs-extversion: 5.1.3
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working