Hacker News new | past | comments | ask | show | jobs | submit login

I am hoping that ruff goes after type checking next to replace mypy which is pretty slow. One tool to rule them all



Have you by any chance used Pyright? If not, I can highly recommend it. The VS Code extension makes writing Python almost as if it's a statically typed language (+ there is a CLI if you want to check types in CI). The docs are claiming that it's 3-5x faster than mypy - I haven't run performance benchmarks myself, all I can say is that for all my code bases it is very fast after the first cold start.

Comparison to mypy: https://github.com/microsoft/pyright/blob/main/docs/mypy-com...


Have you checked out Pyright[1]? It's not one tool to rule then all, but it is nice and fast.

[1]https://github.com/microsoft/pyright


Pyright is neat but the CLI output makes me want to poke my eyes.


dmypy [0] (installed when you install mypy) will give you a x10 speedup when running mypy after small regular edits (e.g. during general development).

But yeah, I'm also looking forward to the day when I only need a single speedy tool for python linting, type-checking and formatting.

0: https://mypy.readthedocs.io/en/stable/mypy_daemon.html


they've successfully replace pylama and black so yeah I really hope it's their next target (though handling types is a whole different beast altogether)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: