7 ms·
I eagerly await ruff-but-for-type-checking. Python type checkers are all excruciatingly slow at the moment.
by nmca 3y ago
I eagerly await ruff-but-for-type-checking. Python type checkers are all excruciatingly slow at the moment.
- diarrhea 3y agoYep. Speed is one factor, but also standardisation. I’ve always been using mypy, but heard good things about pyright. It’s what VSCode uses by default as well, unless you jump through hoops. So I have pyright in the IDE and mypy everywhere else, yet they don’t agree with one another in various cases. Exhaustiveness checking and type inference in structural pattern matching, and async TaskGroups are some examples. One of my code bases has mixed “type: ignore” and “pyright: ignore” (forget the exact syntax) for that reason. Pretty bizarre and not something you’d see in any other language! I wonder why mypy isn’t the blessed standard and pyright was able to catch up on (and in parts overtake) it. Mypy had a large head start and enjoys tons of development effort. Good job to Microsoft I suppose?
- imron 3y agoUse dmypy - the daemon version of mypy (installed when you install mypy) that runs 10x the speed for local edits/changes. https://mypy.readthedocs.io/en/stable/mypy_daemon.html https://mypy.readthedocs.io/en/stable/mypy_daemon.html (But I also await ruff type checking)