-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
"Type[Model]" has no attribute "objects" (again?) #83
Comments
Try to enable plugin in |
I've already enabled that, but did not commited yet =) Also, without plugin there is no errors at all, but they showed up when I installed
|
Yeah, this is |
I don't ise forms a lot too, those were created by cookiecutter template automatically. I'll try to fix that and file a pull request tomorrow. |
The errors you describe in the issue are due to the typing of
Indeed given just a general You have two avenues to improve this as far as I can see:
|
I dived in the Django sources, and So then maybe signature should be like P.S.: I found yours mypy hook that checks AUTH_USER_MODEL and extracts its value. Cool thing, didn't know about that. |
I use an abstract |
If |
If issue is indeed with |
Wait for #109, I've added default UPD. Problem here, I think, is because |
DRF plugin is not compatible to new branch yet, sorry. Will be at the end of the week. |
Hello. I tried to use your package yesterday and I like it, although I've encountered one issue, when the django model I was accessing had no attribute 'objects', according to mypy. So it's like #16:
The repo where I found that is https://github.com/kam1sh/anchor.
Also, I looked at django-stubs source code, and the class had no 'objects' field at all. Is it intended?
https://github.com/mkurnikov/django-stubs/blob/0e60b70ae4f521e3a527997d6b79e461d9245dfa/django-stubs/db/models/base.pyi#L9-L16
The text was updated successfully, but these errors were encountered: