This looks neat. Does anyone have experience with using type hints and mypy with Django? Any gotchas?
I gave ‘django-stubs’ a spin on a Django 2.2 project. The ORM typings and mypy plug-in worked great. ‘.filter().first()’ and similar all returned the correct types. Ran into a couple issues with the typing of ‘client.force_login()’ where the ‘user’ parameter was typed as the ‘get_django_user()’ which wasn’t the same as the custom user model I defined in the ‘models.py’. I also had issues with ‘from django.conf import…
> I also had issues with ‘from django.conf import settings’ not being the correct type so I’d suggest changing that to ‘Any’.
This one also has plugin support, and should be working mostly correct. Fill the issue if you can reproduce, I'd love to help with that.
What's your experience with that whole "plugin has to actually run django.setup() before typecheck" thing?