Hacker News new | ask | show | jobs
by davepeck 1262 days ago
Yes. I moved a very large/mature Django project from use of MyPy to use of Pyright. My experience was that pyright flagged a bunch of new conditions that MyPy seemed to have missed. The cost was that I needed to add (many!) explicit annotations or casts in places the Django MyPy plug-in would have just “known” about the types, for instance in foreign key relations in Models.

In general, we were very happy with the result and never looked back. Correctness and perf were both notably improved. (That pyright is also part of pylance, Microsoft’s proprietary LSP implementation for Python that plays well with VSCode, was an advantage for this particular team.)

This was about a year and a half ago so the experience may differ; both pyright and mypy + its plugins have gotten more capable and mature over time.