We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
django-stubs/django-stubs/contrib/auth/__init__.pyi
Line 21 in 9b50861
probably would require a mypy plugin to adjust the type similar to the one for django.contrib.auth.get_user_model
django.contrib.auth.get_user_model
I suspect #1353 is related at least and may be solved by fixing this as well
(sorry for cutting off the rest of the bug report template -- I haven't been able to pin down a minimal example!)
The text was updated successfully, but these errors were encountered:
After reading through #1353 it seems that will also be closed by adjusting authenticate with the plugin.
authenticate
I think one form of minimal example is
# myapp/models.py from django.db import models class User(models.Model): ...
# settings.py INSTALLED_APPS = ["django.contrib.contenttypes", "django.contrib.auth", "myapp"] AUTH_USER_MODEL = "myapp.User"
# main from django.contrib.auth import authenticate reveal_type(authenticate()) # N: Revealed type is "Union[myapp.models.User, None]"
Sorry, something went wrong.
AUTH_USER_MODEL
get_type_analyze_hook
Successfully merging a pull request may close this issue.
Bug report
django-stubs/django-stubs/contrib/auth/__init__.pyi
Line 21 in 9b50861
probably would require a mypy plugin to adjust the type similar to the one for
django.contrib.auth.get_user_model
I suspect #1353 is related at least and may be solved by fixing this as well
(sorry for cutting off the rest of the bug report template -- I haven't been able to pin down a minimal example!)
The text was updated successfully, but these errors were encountered: