3 ms·
Why anyone would still use mypy besides legacy infrastructure is beyond me. It is dog slow as well as being the laziest of all, not catching many mistakes. Unf
by KolmogorovComp 4mo ago
Why anyone would still use mypy besides legacy infrastructure is beyond me. It is dog slow as well as being the laziest of all, not catching many mistakes.
Unfortunately for Django apps switching to any alternative leads to the dreaded “wall of errors” issue. If anyone got to work this out in the past, I’d gladly take advices.
- thr1owaway9621 4mo agoI use pyright with a 50k LOC Django REST API codebase. I haven't really had problems. From my pyproject.toml: django==4.2.30 djangorestframework==3.16.1 --- django-types==0.15.0 djangorestframework-types==0.8.0 pyright==1.1.390 My dj version is pretty old, but I'd assume things have only gotten better since v 4?
- cptmurphy 4mo agoThe django mypy plugin can inspect django models types, project settings and much more context.
- Syntaf 4mo agoWe switched our very large Django monolith codebase over to ty — the trick for us was generating stubs for Django models and having tooling keep those stubs in sync with the actual models. Went from type checking taking ~10 minutes in CI to now taking ~15 seconds and runs on pre-commit. Absolute game changer, I think we spent $10k in claude credits and did the entire mypy -> ty refactor in about 3 weeks.