Hacker News new | ask | show | jobs
by winrid 95 days ago
Mypy still best for Django
1 comments

As a long time Django user that wants to start using typing, can you elaborate on why mypy is still the way to go?
There's a really nice typing plug-in for mypy that's been around a long time: https://github.com/typeddjango/django-stubs

It is very disappointing that these new type checkers don't support plug-ins, so things like django-stubs aren't possible. That means you're stuck with whatever is delivered with these new type checkers. It must be really difficult since none of them support plug-ins. Some of these newer type checkers promise support for Django, but you're stuck with what they (will) have on offer. Also, you'll likely want typing for other libs you might use.

Pyrefly's Django support is documented here: https://pyrefly.org/en/docs/django/

I believe Zuban also has some form of Django support, but I'm unable to locate the docs