-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
KeyError running mypy for a django project #1410
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
Comments
The |
@gvanrossum thanks for the clarification. I could get it working -
I had to edit the files generated by stubgen though. Is this expected or is it a bug with stubgen? In some cases, it seemed like the pyi files generated by stubgen was not what mypy expected. Should I list the problems here? |
Yes, the stub generator is far from perfect. Most people manually edit the stubs until they work well enough and then submit then to the typeshed repo. Do you want to give that a try? If you need more help figuring out how to edit your stubs for very basic things please do show some details here. (I'm not going to be able to try and run stubgen on django myself, so please do copy code snippets if you're using this option.) |
Thanks for the explanation. The stub files I have so far are here - https://github.com/caulagi/django-mypy/tree/master/stubs/django. I will take this over to django-developers now and see what the opinion is. |
I was trying to run latest mypy (cloned from github) on my test django project code but I get the following error -
The other thing confusing me is that I get different keyerrors if I run the same command again
What am I missing? I am using Django==1.9.5 and this is my polls/views - https://github.com/caulagi/django-mypy/blob/master/polls/views.py
The text was updated successfully, but these errors were encountered: